-
Notifications
You must be signed in to change notification settings - Fork 3
/
ios_hook.js
23 lines (19 loc) · 877 Bytes
/
ios_hook.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// var modules = Process.enumerateModules();
// for (let index = 0; index < modules.length; index++) {
// const module = modules[index];
// console.log("Module [" + module.name + "], offset: " + module.base);
// }
var lib_name = "BannerExample";
var baseAddress = Module.findBaseAddress(lib_name);
Interceptor.attach(Module.getExportByName(lib_name, 'GADCanonicalURL'), {
onEnter: function (args) {
console.log('Context information:');
console.log('Context : ' + JSON.stringify(this.context));
console.log('Return : ' + this.returnAddress);
console.log('Return(Offset) : ' + this.returnAddress.sub(baseAddress));
console.log(ObjC.Object(args[0]));
// var m = Memory.readCString(args[1]);
// if (m != 'length' && !m.startsWith('_fastC'))
// send(m);
}
});