var targetModule = 'app_name';
var addr = ptr(offset);
var moduleBase = Module.getBaseAddress(targetModule);
var targetAddress = moduleBase.add(addr);
Interceptor.attach(targetAddress, {
onEnter: function(args) {
console.log('Adresse de x0 ' + addr + 'Valeur : ' + this.context.name_var);
},
});
Script changer valeur retour
var targetModule = 'app_name';
var addr = ptr(offset);
var moduleBase = Module.getBaseAddress(targetModule);
var targetAddress = moduleBase.add(addr);
Interceptor.attach(targetAddress, {
onLeave: function(retval) {
console.log("Valeur retourne par la methode isJailbreak : "+retval);
retval.replace(value);
},
});
Script qui Hook une native Fonction et qui renvoie sa Backtrace
Interceptor.attach(Module.findExportByName(null, "fopen"), {
onEnter: function(args) {
console.log("+++++++++++++++Interception de la fonction fopen+++++++++++++\n");
//console.log(args[0].readCString());
var backtrace= Thread.backtrace(this.context, Backtracer.ACCURATE).map(DebugSymbol.fromAddress).join('\n');
console.log(backtrace);
},
//onLeave: function(args) {
//console.log("+++++++Interception de la fonction fopen++++++++++++");
//console.log("Interceptor attached onLeave...");
// }
});