idhyt / AndroidFridaFuzz

android app native so fuzz. efficiently run in a real machine with frida environment.
Apache License 2.0
37 stars 5 forks source link

compile except! [Errno 2] No such file or directory: './node_modules/frida-compile/bin/compile.js' #2

Closed Securee closed 10 months ago

Securee commented 11 months ago

when run make build, it shows: compile except! [Errno 2] No such file or directory: './node_modules/frida-compile/bin/compile.js'

where and how to generate the compile.js ?

idhyt commented 10 months ago

install it by npm npm install frida-compile the latest version path maybe change to node_modules/frida-compile/dist/cli.js

Securee commented 10 months ago

install it by npm npm install frida-compile the latest version path maybe change to node_modules/frida-compile/dist/cli.js

yes,I make some chage in the ./tests/config.json { "compile": { "template": "native.js", "target_module": "libaff-test.so", "target_function": "vul_func_buf", "ret_type": "int", "args": [ {"type": "pointer", "size": 0}, {"type": "pbl_int", "size": 0} ] }, "fcj": "./node_modules/frida-compile/dist/cli.js", "target": "com.example.aff", "seeds": "./tests/seeds", "script": "./tests/compiled.js" }

but there are another error when make build: python fuzz.py --compile ./tests/config.json Error: compilation failed at Module.build (file:///home/lzy/tools/AndroidFridaFuzz/node_modules/frida-compile/dist/compiler.js:34:15) at main (file:///home/lzy/tools/AndroidFridaFuzz/node_modules/frida-compile/dist/cli.js:37:33) at file:///home/lzy/tools/AndroidFridaFuzz/node_modules/frida-compile/dist/cli.js:57:5 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:530:24) at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12) compile except! Command '['./node_modules/frida-compile/dist/cli.js', '/home/lzy/tools/AndroidFridaFuzz/andff/template/native.js.tmp', '-o', './tests/compiled.js']' returned non-zero exit status 1.

idhyt commented 10 months ago

install it by npm npm install frida-compile the latest version path maybe change to node_modules/frida-compile/dist/cli.js

yes,I make some chage in the ./tests/config.json { "compile": { "template": "native.js", "target_module": "libaff-test.so", "target_function": "vul_func_buf", "ret_type": "int", "args": [ {"type": "pointer", "size": 0}, {"type": "pbl_int", "size": 0} ] }, "fcj": "./node_modules/frida-compile/dist/cli.js", "target": "com.example.aff", "seeds": "./tests/seeds", "script": "./tests/compiled.js" }

but there are another error when make build: python fuzz.py --compile ./tests/config.json Error: compilation failed at Module.build (file:///home/lzy/tools/AndroidFridaFuzz/node_modules/frida-compile/dist/compiler.js:34:15) at main (file:///home/lzy/tools/AndroidFridaFuzz/node_modules/frida-compile/dist/cli.js:37:33) at file:///home/lzy/tools/AndroidFridaFuzz/node_modules/frida-compile/dist/cli.js:57:5 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:530:24) at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12) compile except! Command '['./node_modules/frida-compile/dist/cli.js', '/home/lzy/tools/AndroidFridaFuzz/andff/template/native.js.tmp', '-o', './tests/compiled.js']' returned non-zero exit status 1.

This project has been around for too long and may no longer be compatible with the latest libraries. I just tested it on a lower version, you can try~

npm install frida-compile@10.2.5
❯ make build
python fuzz.py --compile ./tests/config.json
compile success! ./tests/compiled.js
Securee commented 10 months ago

Your are right, so I need to change th latest frida-compile to 10.2.5,and it works ! Thanks so much.