Created
December 22, 2016 00:26
-
-
Save agustingianni/2862f0871b9bfb5ab3b3828e34ebacfb 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
| #!/usr/bin/env bash | |
| export SAMPLES_DIR=/Users/anon/workspace/fuzzing/tests | |
| export TEST_PROGRAM=/Users/anon/workspace/retools/build/src/tools/binary_info/binary_info | |
| export AFL_PATH=/Users/anon/Downloads/afl-2.35b | |
| export MINIMIZED_SAMPLES_DIR=$SAMPLES_DIR/minimized | |
| mkdir fuzzing_build | |
| pushd fuzzing_build | |
| CC=$AFL_PATH/afl-clang-fast CXX=$AFL_PATH/afl-clang-fast++ cmake .. | |
| AFL_HARDEN=1 make | |
| # Copy only the files that optimize coverage. | |
| $AFL_PATH/afl-cmin -i $SAMPLES_DIR -o $MINIMIZED_SAMPLES_DIR -- $TEST_PROGRAM @@ | |
| for i in $MINIMIZED_SAMPLES_DIR/*; do | |
| $AFL_PATH/afl-tmin -i $i -o $i.min -- $TEST_PROGRAM @@; | |
| done; | |
| $AFL_PATH/afl-fuzz -i $MINIMIZED_SAMPLES_DIR -o crashes $TEST_PROGRAM @@ | |
| popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment