From 70bd0f799de1a907627b28ad80a447634299839b Mon Sep 17 00:00:00 2001 From: van Hauser Date: Wed, 8 Jul 2020 09:39:26 +0200 Subject: fix afl-whatsup if fuzzer_stats is still empty --- afl-whatsup | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/afl-whatsup b/afl-whatsup index 1f3a8219..abcddbf1 100755 --- a/afl-whatsup +++ b/afl-whatsup @@ -162,7 +162,8 @@ for i in `find . -maxdepth 2 -iname fuzzer_stats | sort`; do ALIVE_CNT=$((ALIVE_CNT + 1)) - EXEC_SEC=$((execs_done / RUN_UNIX)) + EXEC_SEC=0 + test -z "$RUN_UNIX" -o "$RUN_UNIX" = 0 || EXEC_SEC=$((execs_done / RUN_UNIX)) PATH_PERC=$((cur_path * 100 / paths_total)) TOTAL_TIME=$((TOTAL_TIME + RUN_UNIX)) @@ -184,7 +185,9 @@ for i in `find . -maxdepth 2 -iname fuzzer_stats | sort`; do echo " ${RED}timeout_ratio $TIMEOUT_PERC%${NC}" fi - if [ $EXEC_SEC -lt 100 ]; then + if [ $EXEC_SEC -eq 0 ]; then + echo " ${YELLOW}no data yet, 0 execs/sec${NC}" + elif [ $EXEC_SEC -lt 100 ]; then echo " ${RED}slow execution, $EXEC_SEC execs/sec${NC}" fi -- cgit 1.4.1