mirror of
https://github.com/keystone-engine/keystone
synced 2026-06-08 15:15:30 +00:00
2415081164
* moved files to suite * integrated @eke dictionaries * added arch support to fuzz.sh
24 lines
412 B
Bash
Executable File
24 lines
412 B
Bash
Executable File
#!/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
|