Last active
April 16, 2019 13:32
-
-
Save caccavale/4f251625b7254f21f8449efb8b810571 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export AFL_NO_AFFINITY=1 | |
while [ -z "$sync_dir" ]; do | |
while getopts ":o:" opt; do | |
case "${opt}" in | |
o) | |
sync_dir="${OPTARG}" | |
;; | |
*) | |
#echo "${opt}: ${OPTARG}" | |
;; | |
esac | |
done | |
((OPTIND++)) | |
[ $OPTIND -gt $# ] && break | |
done | |
for i in $(seq 1 $(( ${NPROC:-$(nproc)} - 1)) ); do | |
taskset -c "$i" ./afl-fuzz -S "slave$i" $@ >/dev/null 2>&1 & | |
done | |
taskset -c 0 ./afl-fuzz -M master $@ >/dev/null 2>&1 & | |
sleep 5 | |
watch -n1 "echo \"Executing './afl-fuzz $@' on ${NPROC:-$(nproc)} cores.\" && ./afl-whatsup -s ${sync_dir}" | |
pkill afl-fuzz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment