Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program 'test.py' not found or not executable #13

Open
NikParam42 opened this issue Feb 13, 2020 · 7 comments
Open

Program 'test.py' not found or not executable #13

NikParam42 opened this issue Feb 13, 2020 · 7 comments

Comments

@NikParam42
Copy link

NikParam42 commented Feb 13, 2020

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.

@NikParam42
Copy link
Author

NikParam42 commented Feb 14, 2020

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 [...]

@jwilk
Copy link
Owner

jwilk commented Feb 17, 2020

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.)

@NikParam42
Copy link
Author

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.)

fuzz

@jwilk
Copy link
Owner

jwilk commented Feb 27, 2020

Does target.py have the executable bit set? Does it have correct shebang?

@soemthlng
Copy link

@jwilk
A python script without a shebang is not suitable for this fuzzer?

@jwilk
Copy link
Owner

jwilk commented Nov 17, 2021

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.

@soemthlng
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants