|
import frida |
|
import streamlit as st |
|
|
|
|
|
def get_frida_logs(pid): |
|
try: |
|
session = frida.attach(pid) |
|
|
|
|
|
script_content = """ |
|
Java.perform(function() { |
|
var MainActivity = Java.use('com.example.fridatest.MainActivity'); |
|
|
|
MainActivity.dispatchTakePictureIntent.implementation = function() { |
|
send("Camera intent called"); |
|
return this.dispatchTakePictureIntent(); |
|
}; |
|
}); |
|
""" |
|
|
|
script = session.create_script(script_content) |
|
script.on('message', on_message) |
|
script.load() |
|
|
|
|
|
st.write("Waiting for logs...") |
|
while True: |
|
pass |
|
|
|
except Exception as e: |
|
st.error(f"Ошибка: {str(e)}") |
|
|
|
def on_message(message, data): |
|
st.write(f"[*] Message from Frida: {message}") |
|
|
|
|
|
st.title("Frida Log Viewer") |
|
pid = st.text_input("Введите PID процесса:", "") |
|
|
|
if st.button("Получить логи"): |
|
if pid: |
|
get_frida_logs(int(pid)) |
|
else: |
|
st.warning("Пожалуйста, введите PID процесса.") |