This commit is contained in:
iddoeldor 2019-08-18 12:05:00 +03:00 committed by GitHub
parent a850707367
commit cc9e3d9fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@
* [`Intercept entire module`](#intercept-entire-module)
* [`Dump memory segments`](#dump-memory-segments)
* [`Memory scan`](#memory-scan)
* [`Stalker`](#stalker)
</details>
@ -1766,6 +1766,47 @@ pattern [ 52 41 4e 44 4f 4d ] {
<br>[⬆ Back to top](#table-of-contents)
#### Stalker
```js
Interceptor.attach(ObjC.classes.CustomClass['- func'].implementation, {
onEnter: function (args) {
var tid = Process.getCurrentThreadId();
this.tid = tid;
console.warn(`onEnter [ ${tid} ]`);
Stalker.follow(tid, {
transform: function (iterator) {
var instruction;
while ((instruction = iterator.next()) !== null) {
iterator.keep();
console.log('\t' + instruction.address, instruction.toString()); // to get offset > save module base & use .sub()
}
}
})
},
onLeave: function (retval) {
console.log(`onLeave [ ${this.tid} ]`);
// cleanup
Stalker.unfollow(this.tid);
Stalker.garbageCollect();
}
})
```
<details>
<summary>Output example</summary>
TODO
</details>
<br>[⬆ Back to top](#table-of-contents)
#### Device properties
Example of quick&dirty iOS device properties extraction