This repository has been archived on 2024-09-30. You can view files and clone it, but cannot push or open issues/pull-requests.
hook-frida/test.py

25 lines
604 B
Python

import frida
def is_frida_running(device):
try:
# 获取设备上的所有进程
processes = device.enumerate_processes()
# 检查是否存在名为 'frida-server' 的进程
for process in processes:
print(process)
if process.name == 'frida':
return True
return False
except Exception as e:
print(f"Error: {e}")
return False
device = frida.get_usb_device(timeout=3)
if is_frida_running(device):
print("Frida is running on the device.")
else:
print("Frida is not running on the device.")