mirror of
https://github.com/frida/frida-python.git
synced 2026-11-07 09:35:57 -10:00
Update to the new core API
This commit is contained in:
1 parent
6198056a9b
commit
490fbf20b8
3 files changed
+92
-17
No files matched your search
@@ -14,6 +14,7 @@ class Application(object):
|
||||
|
||||
self._device.on("child-added", lambda child: self._reactor.schedule(lambda: self._on_child_added(child)))
|
||||
self._device.on("child-removed", lambda child: self._reactor.schedule(lambda: self._on_child_removed(child)))
|
||||
self._device.on("output", lambda pid, fd, data: self._reactor.schedule(lambda: self._on_output(pid, fd, data)))
|
||||
|
||||
def run(self):
|
||||
self._reactor.schedule(lambda: self._start())
|
||||
@@ -61,6 +62,9 @@ Interceptor.attach(Module.findExportByName(null, 'open'), {
|
||||
def _on_child_removed(self, child):
|
||||
print("⚡ child_removed: {}".format(child))
|
||||
|
||||
def _on_output(self, pid, fd, data):
|
||||
print("⚡ output: pid={}, fd={}, data={}".format(pid, fd, repr(data)))
|
||||
|
||||
def _on_detached(self, pid, session, reason):
|
||||
print("⚡ detached: pid={}, reason='{}'".format(pid, reason))
|
||||
self._sessions.remove(session)
|
||||
|
||||
Reference in new issue
Block a user