google / AFL

american fuzzy lop - a security-oriented fuzzer
https://lcamtuf.coredump.cx/afl/
Apache License 2.0
3.56k stars 625 forks source link

Print all dependencies at once in install script instead of one at a time. #137

Open novafacing opened 3 years ago

novafacing commented 3 years ago

I've installed AFL a few times in the last couple days and have been mildly annoyed by the fact that there is an exit 1 in the qemu build script after each failed dependency. In practice, this means that I (a person who forgot the dependencies) need to run the script several times and install dependencies each time until I have them all. This is a super small patch, but it fixes the issue and just gives you the full list of missing dependencies. I just tested on a fresh Ubuntu 20.04 docker:

root@1c3eaa577e21:/AFL/qemu_mode# ./build_qemu_support.sh 
=================================================
AFL binary-only instrumentation QEMU build script
=================================================

[*] Performing basic sanity checks...
[-] Error: 'libtool' not found, please install first.
[-] Error: 'wget' not found, please install first.
[-] Error: 'python' not found, please install first.
[-] Error: 'automake' not found, please install first.
[-] Error: 'autoconf' not found, please install first.
[-] Error: 'bison' not found, please install first.
[-] Error: devel version of 'glib2' not found, please install first.
[-] Error: dependencies missing. Please install them and try again!
root@1c3eaa577e21:/AFL/qemu_mode# apt-get install libtool-bin wget python automake autoconf bison libglib2.0-dev

Hopefully this 5 minute fix makes life a little easier for folks :)