1# Script based on code from https://github.com/ndmitchell/hexml/issues/6
2# More examples of things to do are at that ticket
5echo DISABLED DUE TO SEGFAULT IN CLANG WHEN COMPILING AFL
6echo See https://github.com/ndmitchell/hexml/issues/14
10if ! command -v afl-clang-fast > /dev/null ; then
11 wget http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz
15 cd llvm_mode && make && cd ..
17 cd libdislocator && make && sudo make install && cd ..
22AFL_USE_ASAN=1 afl-clang-fast -O2 -Icbits cbits/fuzz.c -o $PWD/hexml-fuzz
25if ! grep -q core /proc/sys/kernel/core_pattern ; then
26 echo core | sudo tee /proc/sys/kernel/core_pattern
29 afl-fuzz -T hexml -m none -x /usr/local/share/afl/dictionaries/xml.dict -i $PWD/xml -o $PWD/afl-results -- $PWD/hexml-fuzz @@
31 AFL_EXIT_WHEN_DONE=1 timeout 5m afl-fuzz -T hexml -m none -x /usr/local/share/afl/dictionaries/xml.dict -i $PWD/xml -o $PWD/afl-results -- $PWD/hexml-fuzz @@ > /dev/null || true
32 cat afl-results/fuzzer_stats
33 grep "unique_crashes *: 0" afl-results/fuzzer_stats # fail if there are failures
37# $ AFL_PRELOAD=/usr/local/lib/afl/libdislocator.so afl-cmin -i results/crashes/ -o results.shrunk -- $PWD/a.out @@
39# $ for x in `ls results.shrunk`; do AFL_PRELOAD=/usr/local/lib/afl/libdislocator.so afl-tmin -i results.shrunk/$x -o results.min/$x -- $PWD/a.out @@; done
40# $ AFL_PRELOAD=/usr/local/lib/afl/libdislocator.so afl-analyze -i results.shrunk/id:000013,sig:11,src:000002,op:havoc,rep:4 -- ./a.out @@
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list