]> Nishi Git Mirror - gwion.git/commitdiff
:wrench: Fuzz stuff clean
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 18 May 2020 16:01:41 +0000 (18:01 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 18 May 2020 16:04:14 +0000 (18:04 +0200)
.gitignore
scripts/afl-multicore.conf [new file with mode: 0644]
scripts/bug_notify.sh [new file with mode: 0644]

index 79d41d63a624ae040db01466c15cc29c67b5637b..29ba8fb9cf802485b5000ed2eadfb6cfba45c174 100644 (file)
@@ -1,5 +1,7 @@
 TODO*
 gwion
+gwion-fuzz
+afl
 .d
 config.mk
 include/generated.h
diff --git a/scripts/afl-multicore.conf b/scripts/afl-multicore.conf
new file mode 100644 (file)
index 0000000..232b4cc
--- /dev/null
@@ -0,0 +1,13 @@
+{
+    "session": "SESSION",
+    "input": "../corpus-cmin",
+    "output": "./AFL",
+    "target": "./gwion-fuzz",
+    "cmdline": "",
+    "dict": "./scripts/afl-dict/sum",
+    "master_instances": 1,
+    "interactive": false,
+    "environment": [
+        "AFL_PERSISTENT=1"
+    ]
+}
diff --git a/scripts/bug_notify.sh b/scripts/bug_notify.sh
new file mode 100644 (file)
index 0000000..3d3626a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+wait() {
+  inotifywait -q -r AFL/ --format "%w%f" | tail -1
+}
+
+notify() {
+  dbus-launch notify-send -u critical -c bug \
+    -i dialog-error \
+    -h STRING:filename:'$1" '🐉 found bug !'
+}
+while true
+do
+  file=$(wait)
+  [[ $file == *"crashes"* ]] || continue
+  base=$(basename $file)
+  [ ${base:0:3} = "id:" ] && notify "$base"
+done