mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 17:21:33 +00:00
afl-whatsup add coverage output
This commit is contained in:
parent
8cf6a13eb7
commit
213298fe59
12
afl-whatsup
12
afl-whatsup
@ -70,6 +70,8 @@ if [ -d queue ]; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BC=`which bc 2>/dev/null`
|
||||||
|
|
||||||
RED=`tput setaf 9 1 1 2>/dev/null`
|
RED=`tput setaf 9 1 1 2>/dev/null`
|
||||||
GREEN=`tput setaf 2 1 1 2>/dev/null`
|
GREEN=`tput setaf 2 1 1 2>/dev/null`
|
||||||
BLUE=`tput setaf 4 1 1 2>/dev/null`
|
BLUE=`tput setaf 4 1 1 2>/dev/null`
|
||||||
@ -91,6 +93,7 @@ TOTAL_CRASHES=0
|
|||||||
TOTAL_HANGS=0
|
TOTAL_HANGS=0
|
||||||
TOTAL_PFAV=0
|
TOTAL_PFAV=0
|
||||||
TOTAL_PENDING=0
|
TOTAL_PENDING=0
|
||||||
|
TOTAL_COVERAGE=
|
||||||
|
|
||||||
# Time since last find / crash / hang, formatted as string
|
# Time since last find / crash / hang, formatted as string
|
||||||
FMT_TIME="0 days 0 hours"
|
FMT_TIME="0 days 0 hours"
|
||||||
@ -147,6 +150,13 @@ for i in `find . -maxdepth 2 -iname fuzzer_stats | sort`; do
|
|||||||
RUN_UNIX=$run_time
|
RUN_UNIX=$run_time
|
||||||
RUN_DAYS=$((RUN_UNIX / 60 / 60 / 24))
|
RUN_DAYS=$((RUN_UNIX / 60 / 60 / 24))
|
||||||
RUN_HRS=$(((RUN_UNIX / 60 / 60) % 24))
|
RUN_HRS=$(((RUN_UNIX / 60 / 60) % 24))
|
||||||
|
COVERAGE=$(echo $bitmap_cvg|tr -d %)
|
||||||
|
if [ -n "$TOTAL_COVERAGE" -a -n "$B" ]; then
|
||||||
|
if [ "$(echo "$TOTAL_COVERAGE < $COVERAGE" | bc)" -eq 1 ]; then
|
||||||
|
TOTAL_COVERAGE=$COVERAGE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$TOTAL_COVERAGE" ]; then TOTAL_COVERAGE=$COVERAGE ; fi
|
||||||
|
|
||||||
test -n "$cycles_wo_finds" && {
|
test -n "$cycles_wo_finds" && {
|
||||||
test -z "$FIRST" && TOTAL_WCOP="${TOTAL_WCOP}/"
|
test -z "$FIRST" && TOTAL_WCOP="${TOTAL_WCOP}/"
|
||||||
@ -227,6 +237,7 @@ for i in `find . -maxdepth 2 -iname fuzzer_stats | sort`; do
|
|||||||
echo " last_crash : $FMT_CRASH"
|
echo " last_crash : $FMT_CRASH"
|
||||||
echo " last_hang : $FMT_HANG"
|
echo " last_hang : $FMT_HANG"
|
||||||
echo " cycles_wo_finds : $FMT_CWOP"
|
echo " cycles_wo_finds : $FMT_CWOP"
|
||||||
|
echo " coverage : $COVERAGE%"
|
||||||
|
|
||||||
CPU_USAGE=$(ps aux | grep $fuzzer_pid | grep -v grep | awk '{print $3}')
|
CPU_USAGE=$(ps aux | grep $fuzzer_pid | grep -v grep | awk '{print $3}')
|
||||||
MEM_USAGE=$(ps aux | grep $fuzzer_pid | grep -v grep | awk '{print $4}')
|
MEM_USAGE=$(ps aux | grep $fuzzer_pid | grep -v grep | awk '{print $4}')
|
||||||
@ -302,6 +313,7 @@ if [ "$ALIVE_CNT" -gt "1" ]; then
|
|||||||
echo " Pending per fuzzer : $((TOTAL_PFAV/ALIVE_CNT)) faves, $((TOTAL_PENDING/ALIVE_CNT)) total (on average)"
|
echo " Pending per fuzzer : $((TOTAL_PFAV/ALIVE_CNT)) faves, $((TOTAL_PENDING/ALIVE_CNT)) total (on average)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo " Coverage reached : ${TOTAL_COVERAGE}%"
|
||||||
echo " Crashes saved : $TOTAL_CRASHES"
|
echo " Crashes saved : $TOTAL_CRASHES"
|
||||||
echo " Hangs saved : $TOTAL_HANGS"
|
echo " Hangs saved : $TOTAL_HANGS"
|
||||||
echo "Cycles without finds : $TOTAL_WCOP"
|
echo "Cycles without finds : $TOTAL_WCOP"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
- afl-fuzz:
|
- afl-fuzz:
|
||||||
- added `AFL_FINAL_SYNC` which forces a final fuzzer sync (also for `-F`)
|
- added `AFL_FINAL_SYNC` which forces a final fuzzer sync (also for `-F`)
|
||||||
before terminating.
|
before terminating.
|
||||||
|
- afl-whatsup: now also shows coverage reached
|
||||||
- added benchmark/benchmark.sh if you want to see how good your fuzzing
|
- added benchmark/benchmark.sh if you want to see how good your fuzzing
|
||||||
speed is in comparison to other setups.
|
speed is in comparison to other setups.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user