To use it on a running process, first pip install frida to grab Frida's python bindings and CLI tools, then:
$ frida FooApp -l gvariant-leak-tracker.jsThen in the REPL you can call count() and list() to inspect the values currently alive:
| 'use strict'; | |
| var TrustManager; | |
| var manager; | |
| Java.perform(function () { | |
| var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager'); | |
| TrustManager = Java.registerClass({ | |
| name: 'com.example.TrustManager', |
| 'use strict'; | |
| /* | |
| * Usage: | |
| * $ frida -U -n Twitter -l load-cycript.js | |
| */ | |
| var PORT = 27060; | |
| dlopen('/usr/lib/libcycript.dylib'); |
To use it on a running process, first pip install frida to grab Frida's python bindings and CLI tools, then:
$ frida FooApp -l gvariant-leak-tracker.jsThen in the REPL you can call count() and list() to inspect the values currently alive:
To use it on a running process, first pip install frida to grab Frida's python bindings and CLI tools, then:
$ frida FooApp -l gobject-leak-tracker.jsThen in the REPL you can call count() and list() to inspect the instances currently alive:
| const pendingBlocks = new Set(); | |
| Interceptor.attach(..., { | |
| onEnter(args) { | |
| const block = new ObjC.Block(args[4]); | |
| pendingBlocks.add(block); // Keep it alive | |
| const appCallback = block.implementation; | |
| block.implementation = (success, error) => { | |
| // Do your logging here | |
| appCallback(success, error); |
$ clang -Wall -Os -pipe -g3 frida-gum-example.c -o frida-gum-example -L. -lfrida-gum -lresolv -Wl,-dead_strip -Wl,-no_compact_unwind
$ ./frida-gum-example
[*] open("/etc/hosts")
[*] close(3)
[*] open("/etc/fstab")
[*] close(-1)
[*] listener got 4 calls
[*] listener still has 4 calls
I hereby claim:
To claim this, I am signing this object:
Install Node.js 5.x, then:
npm install frida co uuid
and run:
node app.js
| $ frida-ls-devices | |
| Id Type Name | |
| ---------------------------------------- ------ --------------------------------------------------------- | |
| local local Local System | |
| emulator-5554 tether Android Emulator 5554 | |
| 192.168.57.101:5555 tether Genymotion Samsung Galaxy S5 - 4.4.4 - API 19 - 1080x1920 | |
| 03157df369703a2a tether Samsung SM-G925F | |
| af87839fdec193814e23a59a867d02d08f4a6e1d tether iPhone | |
| tcp remote Local TCP | |
| $ frida-ps -D 03157df369703a2a |
| #!/usr/bin/env iojs --harmony_arrow_functions | |
| 'use strict'; | |
| const co = require('co'); | |
| const frida = require('frida'); | |
| co(function *() { | |
| const session = yield frida.attach('cat'); | |
| const script = yield session.createScript('(' + | |
| agent.toString() + ').call(this);'); |