mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Pass process name to trace on command line
This commit is contained in:
@@ -4,8 +4,12 @@ import frida
|
||||
import tracer
|
||||
|
||||
if __name__ == '__main__':
|
||||
tp = tracer.TracerProfileBuilder().include("read").build()
|
||||
if len(sys.argv) != 2:
|
||||
print "Usage: %s <process name>" % sys.argv[0]
|
||||
sys.exit(1)
|
||||
tp = tracer.TracerProfileBuilder().include_modules("*").exclude_modules("libSystem*").build()
|
||||
t = tracer.Tracer(tp)
|
||||
p = frida.attach("cat")
|
||||
p = frida.attach(sys.argv[1])
|
||||
t.start_trace(p, tracer.STDOUT_SINK)
|
||||
sys.stdin.read()
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user