From a850707367a6d21bc114821301747b3278820d35 Mon Sep 17 00:00:00 2001 From: iddoeldor Date: Tue, 23 Jul 2019 15:36:27 +0300 Subject: [PATCH] scan memory for pattern --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index a62a65a..6c94a60 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ * [`Log method arguments`](#log-method-arguments) * [`Intercept entire module`](#intercept-entire-module) * [`Dump memory segments`](#dump-memory-segments) +* [`Memory scan`](#memory-scan) @@ -1741,6 +1742,28 @@ TODO +#### Memory scan + +```js +var m = Process.findModuleByName(moudleName); +var pattern = 'RANDOM'.split('').map(letter => letter.charCodeAt(0).toString(16)).join(' '); +var res = Memory.scanSync(m.base, m.size, pattern); +console.log(`pattern [ ${pattern} ] ${JSON.stringify(m, null, 2)}\n${JSON.stringify(res)}`); +``` + +
+Output example +pattern [ 52 41 4e 44 4f 4d ] { + "name": "Test", + "base": "0x1048fc000", + "size": 147000, + "path": "/var/containers/Bundle/Application/CD74EB00-9D90-4600-BF5D-F6E5E0CDF878/Test.app/Test" +} +[{"address":"0x10491f211","size":6}] + +
+ +
[⬆ Back to top](#table-of-contents) #### Device properties