]> Nishi Git Mirror - gwion.git/commitdiff
:wrench: Afl crash helper
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Wed, 6 May 2020 17:41:29 +0000 (19:41 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Wed, 6 May 2020 17:41:29 +0000 (19:41 +0200)
scripts/afl-helper.sh [new file with mode: 0644]

diff --git a/scripts/afl-helper.sh b/scripts/afl-helper.sh
new file mode 100644 (file)
index 0000000..5cd6010
--- /dev/null
@@ -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