mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-12 14:02:33 +00:00
7144e756e5
early on any error + anticipate that some tools can't be installed by now, but we still want the test to return success to satisfy travis-ci
38 lines
745 B
Bash
Executable file
38 lines
745 B
Bash
Executable file
#!/bin/bash -ex
|
|
|
|
#
|
|
# AFL
|
|
#
|
|
|
|
curl http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz | tar xz
|
|
mv afl-* afl
|
|
cd afl
|
|
make -j $(nproc)
|
|
cd qemu_mode
|
|
# 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
|
|
./build_qemu_support.sh
|
|
cd ../../
|
|
|
|
mkdir -p bin
|
|
cd bin
|
|
ln -sf ../afl/{afl-as,afl-cmin,afl-gcc,afl-gotcpu,afl-plot,afl-qemu-trace,afl-showmap,afl-tmin,afl-whatsup} .
|
|
cd ..
|
|
|
|
cat <<END > bin/afl-fuzz
|
|
#!/bin/bash
|
|
$PWD/afl/afl-fuzz "\$@"
|
|
END
|
|
chmod 755 bin/afl-fuzz
|
|
|
|
#
|
|
# multiafl
|
|
#
|
|
|
|
git clone --depth 1 https://github.com/zardus/multiafl
|
|
cd bin
|
|
ln -s ../multiafl/multiafl
|
|
cd ..
|