python-afl
python-afl copied to clipboard
Program 'test.py' not found or not executable
Hello everyone! Why this error does not allow me to run fuzzing?
I tried to manually set the AFL_SKIP_BIN_CHECK=1
environment variables, but it doesn't help.
I solved this error. It was correct to run this way
$ py-afl-fuzz [options] -- python /path/to/fuzzed/python/script [...]
But why is it written like this in README if it's wrong?
$ py-afl-fuzz [options] -- /path/to/fuzzed/python/script [...]
I can only guess that you did something like
$ py-afl-fuzz -i in -o out -- test.py
when you actually needed:
$ py-afl-fuzz -i in -o out -- ./test.py
(Assuming that test.py
exists in the current working directory, is executable and has appropriate shebang.)
I can only guess that you did something like
$ py-afl-fuzz -i in -o out -- test.py
when you actually needed:
$ py-afl-fuzz -i in -o out -- ./test.py
(Assuming that
test.py
exists in the current working directory, is executable and has appropriate shebang.)
Does target.py
have the executable bit set? Does it have correct shebang?
@jwilk A python script without a shebang is not suitable for this fuzzer?
py-afl-fuzz
passes all the arguments verbatim to afl-fuzz
, and the later doesn't know of course anything about Python.
So your options are: either add shebang and set the exctuable bit, or specify the interpreter explicitly on the command line.
@jwilk
Ok, I set shebang like this.
#!/home/myname/anaconda3/bin/python3.8
import asyncio
import logging
and I set the executable bit rwxr-xr-x
.
but py-afl-fuzz
still does not work.
I print this error.
[-] PROGRAM ABORT : Program 'test_device.py' not found or not executable
Location : check_binary(), afl-fuzz.c:6548
And I have no idea how to specify the interpreter explicitly on the command line. Could you let me know?