Closed pandasauce closed 6 years ago
Weird! Happens to me, too. But it seems to work when requiring the directory without the index.js
. Seems like a bug in frida-compile/babelify to me, but I can't say I know a lot about the node module system.
If I omit index.js
, compiling doesn't work at all:
Error: Cannot find module 'babelify' from '~/ff/swift-frida'
at ~/sdk/node-v10.12.0-linux-x64/lib/node_modules/frida-compile/node_modules/resolve/lib/async.js:51:31
at processDirs (~/sdk/node-v10.12.0-linux-x64/lib/node_modules/frida-compile/node_modules/resolve/lib/async.js:185:39)
at ondir (~/sdk/node-v10.12.0-linux-x64/lib/node_modules/frida-compile/node_modules/resolve/lib/async.js:200:13)
at load (~/sdk/node-v10.12.0-linux-x64/lib/node_modules/frida-compile/node_modules/resolve/lib/async.js:83:43)
at onex (~/sdk/node-v10.12.0-linux-x64/lib/node_modules/frida-compile/node_modules/resolve/lib/async.js:108:17)
at ~/sdk/node-v10.12.0-linux-x64/lib/node_modules/frida-compile/node_modules/resolve/lib/async.js:12:69
at FSReqWrap.oncomplete (fs.js:154:21)
Managed to resolve this. Usage instructions are missing a critical step:
cd swift-frida
npm install
This installs npm dependencies for swift-frida at the versions from package.json
Steps:
const Swift = require('./swift-frida/index.js');
frida -U -l tmp.js -f app.name
Failed to load script: gDBus.Error:re.frida.Error.InvalidArgument: Script(line 5): SyntaxError: parse error
frida-compile
that don't rely on this library.This is line 5:
let convention;
Using a iOS 11.1 device, Frida 12.2.14.