From: Jérémie Astor Date: Wed, 6 May 2020 17:41:29 +0000 (+0200) Subject: :wrench: Afl crash helper X-Git-Tag: nightly~1647 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d64c47aef33cac073bae2e40fc9477f6a1217b70;p=gwion.git :wrench: Afl crash helper --- diff --git a/scripts/afl-helper.sh b/scripts/afl-helper.sh new file mode 100644 index 00000000..5cd60101 --- /dev/null +++ b/scripts/afl-helper.sh @@ -0,0 +1,22 @@ +set -e +[ $# -lt 2 ] && { + echo "usage: afl-helper crash_dir out_dir" + exit 1 +} + +DEST=$(realpath $2) +cd $DEST +NUM=$(ls *.gw | wc -l) +TMP=0 +for a in *.gw +do + mv $a ${TMP}.gw + TMP=$((TMP+1)) +done + +cd $1 +for a in id* +do + cp $a $DEST/${NUM}.gw + NUM=$((NUM+1)) +done