mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Add frida-trace command line skeleton based on the example
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
SUBDIRS = frida
|
||||
|
||||
bin_SCRIPTS = frida-trace
|
||||
CLEANFILES = $(bin_SCRIPTS)
|
||||
EXTRA_DIST = frida-trace.in
|
||||
|
||||
do_substitution = sed -e 's,[@]pythondir[@],$(pythondir),g' \
|
||||
-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
|
||||
-e 's,[@]VERSION[@],$(VERSION),g'
|
||||
|
||||
frida-trace: frida-trace.in Makefile
|
||||
$(do_substitution) < $(srcdir)/frida-trace.in > $@
|
||||
chmod +x $@
|
||||
|
||||
pyexec_LTLIBRARIES = _frida.la
|
||||
|
||||
_frida_la_SOURCES = \
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.insert(1, '@pythondir@')
|
||||
|
||||
import frida
|
||||
#import frida.tracer
|
||||
import tracer
|
||||
from frida.tracer import TracerProfileBuilder, Tracer
|
||||
|
||||
if __name__ == '__main__':
|
||||
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)
|
||||
tp = TracerProfileBuilder().include_modules("libSystem*").exclude("malloc", "calloc", "realloc", "free").build()
|
||||
t = Tracer(tp)
|
||||
try:
|
||||
target = int(sys.argv[1])
|
||||
except:
|
||||
Reference in New Issue
Block a user