You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
412 B

#!/bin/bash
AFLFUZZ=afl-fuzz
KSTOOL=$(pwd)/../build/kstool/kstool
if [ $# -ne 1 ]; then
echo "Usage: fuzz.sh {arch}"
exit;
fi
pushd .
cd ../build && ../make-afl.sh
popd
pushd .
cd ./afl
for arch in "$@"
do
if [ -d "./dict/$arch" ]; then
$AFLFUZZ -i ./tests -o ./findings -x ./dict/$arch -- $KSTOOL $arch
else
$AFLFUZZ -i ./tests -o ./findings -- $KSTOOL $arch
fi
done
popd