Created
February 18, 2020 01:11
-
-
Save oleavr/c503f4bc07ffd6ba804367d7817e9b3b to your computer and use it in GitHub Desktop.
Frida Hello World
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Try it on a running process like this: | |
* | |
* $ frida gimp-2.10 -l hello.js | |
* | |
* This uses the Frida REPL, which supports live-reload. | |
*/ | |
Interceptor.attach(Module.getExportByName(null, 'open'), { | |
onEnter: function (args) { | |
var path = args[0].readUtf8String(); | |
console.log('open() path="' + path + '"'); | |
}, | |
onLeave: function (retval) { | |
var fd = retval.toInt32(); | |
console.log(' => fd=' + fd); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment