File size: 1,392 Bytes
97278ad ccabf63 be50a26 97278ad be50a26 97278ad 929cdfc 97278ad 929cdfc 97278ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
import frida
import streamlit as st
# Функция для получения логов из Frida
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}")
# Streamlit интерфейс
st.title("Frida Log Viewer")
pid = st.text_input("Введите PID процесса:", "")
if st.button("Получить логи"):
if pid:
get_frida_logs(int(pid))
else:
st.warning("Пожалуйста, введите PID процесса.") |