Skip to content

Instantly share code, notes, and snippets.

@Robert-Cunningham
Created May 9, 2020 03:15
Show Gist options
  • Save Robert-Cunningham/f9f004b035394bed4f141787afc9d1a3 to your computer and use it in GitHub Desktop.
Save Robert-Cunningham/f9f004b035394bed4f141787afc9d1a3 to your computer and use it in GitHub Desktop.
var open = new NativeFunction(Module.findExportByName('libc.so', 'open'), 'pointer', ['pointer', 'int']);
Interceptor.replace(open, new NativeCallback(function (path, mode) {
console.log('opening', Memory.readUtf8String(path))
return open(path, mode)
}, 'pointer', ['pointer', 'int']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment