c++ demangler

This commit is contained in:
iddoeldor 2020-10-14 18:37:28 +03:00 committed by GitHub
parent 7257797be2
commit a6eaabc7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@
* [`Dump memory segments`](#dump-memory-segments)
* [`Memory scan`](#memory-scan)
* [`Stalker`](#stalker)
* [`Cpp Demangler`](#cpp-demangler)
</details>
@ -2165,6 +2166,55 @@ mul x5, x2, x21 # mul 0x3, 0x4, 0x5
#### Cpp demangler
```sh
$ npm i frida-compile demangler-js -g
```
add to your script
```js
const demangle = require('demangler-js').demangle;
...
Module.enumerateExportsSync('library.so')
.filter(x => x.name.startsWith('_Z'))
.forEach(x => {
Interceptor.attach(x.address, {
onEnter: function (args) {
console.log('[-] ' + demangle(x.name));
}
});
});
```
compile
```sh
$ frida-compile script.js -o out.js
```
run
```sh
$ frida -Uf com.app -l out.js
```
<details>
<summary>Output example</summary>
TODO
</details>
<br>[⬆ Back to top](#table-of-contents)
#### Device properties
Example of quick&dirty iOS device properties extraction