mirror of
https://github.com/frida/frida-python.git
synced 2026-11-07 09:35:57 -10:00
Add crash reporting example
This commit is contained in:
1 parent
6b81b45420
commit
f238498cdc
1 file changed
+23
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
import frida
|
||||
|
||||
|
||||
def on_process_crashed(crash):
|
||||
print("on_process_crashed")
|
||||
print("\tcrash:", crash)
|
||||
|
||||
def on_detached(reason, crash):
|
||||
print("on_detached()")
|
||||
print("\treason:", reason)
|
||||
print("\tcrash:", crash)
|
||||
|
||||
device = frida.get_usb_device()
|
||||
device.on('process-crashed', on_process_crashed)
|
||||
session = device.attach("Hello")
|
||||
session.on('detached', on_detached)
|
||||
print("[*] Ready")
|
||||
sys.stdin.read()
|
||||
Reference in new issue
Block a user