frida / frida-node

Frida Node.js bindings
281 stars 65 forks source link

[Error: GDBus.Error:re.frida.Error.InvalidArgument: Script(line 5): SyntaxError: parse error ] #20

Closed tosbaha closed 8 years ago

tosbaha commented 8 years ago

I am trying to learn how frida-node is working. I tried sample source code from Frida Presentations. The code I use is https://github.com/frida/frida-presentations/tree/master/NcN2015/02-ios-crypto When I run node app.js App Store App launches and I get following output on console

hi [Error: GDBus.Error:re.frida.Error.InvalidArgument: Script(line 5): SyntaxError: parse error ]

App Store app hangs for a while then it quits.

What I am trying to do is attach multiple script file to single process. Since I hook lots of functions, it is very hard to type frida-trace and function names.

OS: El Capitan 10.11.4 (15E65) iOS: 9.0.2 Frida: 7.0.11

oleavr commented 8 years ago

Hi,

This is because your iOS device is running iOS 9, so we will make use of the Duktape-based runtime (instead of the default one using V8), meaning that there's almost no support for ES6 language features. The solution is to use https://www.npmjs.com/package/frida-compile to compile your script so it can be used with either runtime (and also gives you access to thousands of existing modules from npm, as well as letting you split up your script into multiple files).

Cheers!