2017-02-16 21:40:17 +00:00
|
|
|
#!/bin/bash -ex
|
2015-05-07 11:02:00 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# AFL
|
|
|
|
#
|
|
|
|
|
2015-12-09 22:28:28 +00:00
|
|
|
curl http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz | tar xz
|
2015-05-07 11:02:00 +00:00
|
|
|
mv afl-* afl
|
|
|
|
cd afl
|
|
|
|
make -j $(nproc)
|
|
|
|
cd qemu_mode
|
2016-02-18 15:10:59 +00:00
|
|
|
# try to detect if python2 and 3 are installed
|
|
|
|
if which python2 >/dev/null; then
|
|
|
|
sed -i 's/python/python2/' ./build_qemu_support.sh
|
|
|
|
sed -i 's!configure!configure --python=\$(which python2)!' ./build_qemu_support.sh
|
|
|
|
fi
|
2015-05-07 11:02:00 +00:00
|
|
|
./build_qemu_support.sh
|
2015-05-08 00:00:45 +00:00
|
|
|
cd ../../
|
2015-05-07 11:02:00 +00:00
|
|
|
|
2015-05-18 02:48:21 +00:00
|
|
|
mkdir -p bin
|
2015-05-07 11:02:00 +00:00
|
|
|
cd bin
|
2015-05-18 02:48:21 +00:00
|
|
|
ln -sf ../afl/{afl-as,afl-cmin,afl-gcc,afl-gotcpu,afl-plot,afl-qemu-trace,afl-showmap,afl-tmin,afl-whatsup} .
|
2015-05-07 11:02:00 +00:00
|
|
|
cd ..
|
|
|
|
|
2015-05-18 02:48:21 +00:00
|
|
|
cat <<END > bin/afl-fuzz
|
|
|
|
#!/bin/bash
|
|
|
|
$PWD/afl/afl-fuzz "\$@"
|
|
|
|
END
|
|
|
|
chmod 755 bin/afl-fuzz
|
|
|
|
|
2015-05-07 11:02:00 +00:00
|
|
|
#
|
2015-05-18 02:50:56 +00:00
|
|
|
# multiafl
|
2015-05-07 11:02:00 +00:00
|
|
|
#
|
|
|
|
|
2015-12-09 22:42:41 +00:00
|
|
|
git clone --depth 1 https://github.com/zardus/multiafl
|
2015-05-18 02:50:56 +00:00
|
|
|
cd bin
|
|
|
|
ln -s ../multiafl/multiafl
|
|
|
|
cd ..
|