Skip to content

Instantly share code, notes, and snippets.

@oleavr
Created Feb 18, 2020
Embed
What would you like to do?
Frida Hello World
/*
* 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