From 5bfb3be54531786517559990c3143a330949ce3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 18 May 2020 18:01:41 +0200 Subject: [PATCH] :wrench: Fuzz stuff clean --- .gitignore | 2 ++ scripts/afl-multicore.conf | 13 +++++++++++++ scripts/bug_notify.sh | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 scripts/afl-multicore.conf create mode 100644 scripts/bug_notify.sh diff --git a/.gitignore b/.gitignore index 79d41d63..29ba8fb9 100644 --- a/.gitignore +++ b/.gitignore @@ -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 index 00000000..232b4cc2 --- /dev/null +++ b/scripts/afl-multicore.conf @@ -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 index 00000000..3d3626a8 --- /dev/null +++ b/scripts/bug_notify.sh @@ -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 -- 2.43.0