Skip to content

Instantly share code, notes, and snippets.

@caccavale
Last active April 16, 2019 13:32
Show Gist options
  • Save caccavale/4f251625b7254f21f8449efb8b810571 to your computer and use it in GitHub Desktop.
Save caccavale/4f251625b7254f21f8449efb8b810571 to your computer and use it in GitHub Desktop.
#!/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