diff options
author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-07-06 18:51:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-06 19:51:52 +0200 |
commit | 43db577dbbdf6973c274f6cffcd27435262df751 (patch) | |
tree | 16e25af19d3df2f01a3fcffd262e61628c416b28 /frida_mode/test/js/entry.js | |
parent | 0662c5580bd46ff37f8f76413ea114712c372d16 (diff) | |
download | afl++-43db577dbbdf6973c274f6cffcd27435262df751.tar.gz |
Changes to make JS run in foreground thread (#1009)
Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/test/js/entry.js')
-rw-r--r-- | frida_mode/test/js/entry.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/frida_mode/test/js/entry.js b/frida_mode/test/js/entry.js index 0b233ddb..2bdd7d13 100644 --- a/frida_mode/test/js/entry.js +++ b/frida_mode/test/js/entry.js @@ -9,13 +9,18 @@ new ModuleMap().values().forEach(m => { Afl.print(`${m.base}-${m.base.add(m.size)} ${m.name}`); }); -Afl.print('Searching...\n'); -const entry_point = DebugSymbol.fromName('run'); -Afl.print(`entry_point: ${entry_point}`); +const name = Process.enumerateModules()[0].name; +Afl.print(`Name: ${name}`); -Afl.setEntryPoint(entry_point.address); +if (name === 'test') { -// Afl.error('HARD NOPE'); + Afl.print('Searching...\n'); + const entry_point = DebugSymbol.fromName('run'); + Afl.print(`entry_point: ${entry_point}`); + + Afl.setEntryPoint(entry_point.address); + +} Afl.done(); Afl.print("done"); |