fuzz_multi.sh (841B)
1 #!/bin/sh 2 3 MEMLIMIT_BYTES=21990500990976 4 5 N_CPUS=1 6 if [ $# -ge 1 ]; then 7 N_CPUS="$1" 8 shift 9 fi 10 11 FILTER="echo" 12 13 for i in $(seq -w "$N_CPUS"); do 14 if [ "$i" -eq 1 ]; then 15 if [ "$N_CPUS" -eq 1 ]; then 16 INSTANCE="" 17 NUMBER="" 18 else 19 INSTANCE="-M" 20 NUMBER="$i" 21 fi 22 else 23 INSTANCE="-S" 24 NUMBER="$i" 25 fi 26 # use whatever remains on the command-line to prefix the fuzzer command 27 # you have to copy and paste and run these commands yourself 28 "$FILTER" "$@" \ 29 ../afl/afl-fuzz \ 30 -i src/test/fuzz/fuzz_dir_testcase \ 31 -o src/test/fuzz/fuzz_dir_findings \ 32 -x src/test/fuzz/fuzz_dir_dictionary/fuzz_dir_http_header.dct \ 33 -m "$MEMLIMIT_BYTES" \ 34 "$INSTANCE" "$NUMBER" \ 35 -- src/test/fuzz_dir 36 done