Created
February 8, 2023 04:18
-
-
Save navichok26/aa6362b395c4a21af2f85ebd520b6c5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function getCaller(context) { | |
return DebugSymbol.fromAddress(Thread.backtrace(context, Backtracer.ACCURATE)[0]); | |
} |
This file contains hidden or 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
Interceptor.attach(Module.findBaseAddress("libCheckYourKey.so").add(0x116D0), { | |
onLeave: function(retval) { | |
console.log("onleave"); | |
} | |
}); |
This file contains hidden or 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
var strcmp = new NativeFunction(Module.findExportByName('libc.so', 'strcmp'), 'int', ['pointer', 'pointer']); | |
Interceptor.replace(strcmp, new NativeCallback(function (prop_ptr, buf_ptr) { | |
var prop = Memory.readUtf8String(prop_ptr); | |
var buf = Memory.readUtf8String(buf_ptr); | |
console.log('strcmp(' + prop + ', ' + buf + ')'); | |
return strcmp(prop_ptr, buf); | |
}, 'int', ['pointer', 'pointer'])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment