oleavr / frida-agent-example

Example Frida agent written in TypeScript
https://www.frida.re/
725 stars 182 forks source link

update example run js error #12

Closed c0618 closed 4 years ago

c0618 commented 4 years ago

Hi : oleavr I updated the latest example and the following error occurred

Failed to load script: script(line 4): SyntaxError: parse error

your code is : var tcp_network_func = Process.getModuleByName('libSystem.B.dylib').enumerateExports().filter((ex => ex.type === 'function' && ['connect', 'recv', 'send', 'read', 'write'].some(prefix => ex.name.indexOf(prefix) === 0))); tcp_network_func.forEach(ex => { console.log(JSON.stringify(ex)); });

c0618 commented 4 years ago

After testing, it may be an error caused by updating "frida-compile": "^10.0.0"

oleavr commented 4 years ago

@c0618 This example now requires Frida >= 14.0.0, released yesterday. (frida-compile@10 no longer compiles the code to ES5, as our default runtime now supports ES2020.)