add print iOS class members
This commit is contained in:
parent
c76f1ce7da
commit
c0a4d4f5f4
17
README.md
17
README.md
@ -1,6 +1,7 @@
|
|||||||
# Contents
|
# Contents
|
||||||
- [Enumerate loaded classes](#enumerate-loaded-classes)
|
- [Enumerate loaded classes](#enumerate-loaded-classes)
|
||||||
- [Dump iOS class hierarchy](#dump-ios-class-hierarchy)
|
- [Dump iOS class hierarchy](#dump-ios-class-hierarchy)
|
||||||
|
- [iOS instance members](#ios-instance-members)
|
||||||
- [List modules](#list-modules)
|
- [List modules](#list-modules)
|
||||||
- [Get methods from .so file](#get-methods-from-so-file)
|
- [Get methods from .so file](#get-methods-from-so-file)
|
||||||
- [SQLite hook example](#sqlite-hook)
|
- [SQLite hook example](#sqlite-hook)
|
||||||
@ -69,6 +70,22 @@ classes.forEach(function(name) {
|
|||||||
send(tree);
|
send(tree);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### iOS instance members
|
||||||
|
Print map of members for each class instance
|
||||||
|
```
|
||||||
|
ObjC.choose(ObjC.classes[clazz], {
|
||||||
|
onMatch: function (obj) {
|
||||||
|
console.log('onMatch: ', obj);
|
||||||
|
Object.keys(obj.$ivars).forEach(function(v) {
|
||||||
|
console.log('\t', v, '=', obj.$ivars[v]);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onComplete: function () {
|
||||||
|
console.log('onComplete', arguments.length);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
#### List modules
|
#### List modules
|
||||||
```
|
```
|
||||||
$ frida -Uq com.android. -e "Process.enumerateModules({onMatch: function(m){console.log('-' + m.name)},onComplete:function(){}})"
|
$ frida -Uq com.android. -e "Process.enumerateModules({onMatch: function(m){console.log('-' + m.name)},onComplete:function(){}})"
|
||||||
|
Loading…
Reference in New Issue
Block a user