• Home
  • Raw
  • Download

Lines Matching +full:fuzz +full:- +full:seconds

3 . ./test-pre.sh
6 test -z "$AFL_CC" && {
16 test -e ../afl-qemu-trace && {
17 cc -pie -fPIE -o test-instr ../test-instr.c
18 cc -o test-compcov test-compcov.c
19 test -e test-instr -a -e test-compcov && {
21 mkdir -p in
23 $ECHO "$GREY[*] running afl-fuzz for qemu_mode, this will take approx 10 seconds"
25 ../afl-fuzz -m ${MEM_LIMIT} -V07 -Q -i in -o out -- ./test-instr >>errors 2>&1
27 test -n "$( ls out/default/queue/id:000002* 2>/dev/null )" && {
28 $ECHO "$GREEN[+] afl-fuzz is working correctly with qemu_mode"
31 echo CUT------------------------------------------------------------------CUT
33 echo CUT------------------------------------------------------------------CUT
34 $ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode"
37 rm -f errors
39 … $ECHO "$GREY[*] running afl-fuzz for qemu_mode AFL_ENTRYPOINT, this will take approx 6 seconds"
42 …export AFL_ENTRYPOINT=`printf 1 | AFL_DEBUG=1 ../afl-qemu-trace ./test-instr 2>&1 >/dev/null | awk…
43 … $ECHO AFL_ENTRYPOINT=$AFL_ENTRYPOINT - $(nm test-instr | grep "T main") - $(file ./test-instr)
44 ../afl-fuzz -m ${MEM_LIMIT} -V2 -Q -i in -o out -- ./test-instr
48 test -n "$( ls out/default/queue/id:000001* 2>/dev/null )" && {
49 $ECHO "$GREEN[+] afl-fuzz is working correctly with qemu_mode AFL_ENTRYPOINT"
52 echo CUT------------------------------------------------------------------CUT
54 echo CUT------------------------------------------------------------------CUT
55 $ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode AFL_ENTRYPOINT"
58 rm -f errors
60 …test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc" -o "$SYS" = "aar…
61 test -e ../libcompcov.so && {
62 $ECHO "$GREY[*] running afl-fuzz for qemu_mode compcov, this will take approx 10 seconds"
66 ../afl-fuzz -m ${MEM_LIMIT} -V07 -Q -i in -o out -- ./test-compcov >>errors 2>&1
70 test -n "$( ls out/default/queue/id:000001* 2>/dev/null )" && {
71 $ECHO "$GREEN[+] afl-fuzz is working correctly with qemu_mode compcov"
73 echo CUT------------------------------------------------------------------CUT
75 echo CUT------------------------------------------------------------------CUT
76 $ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode compcov"
80 $ECHO "$YELLOW[-] we cannot test qemu_mode compcov because it is not present"
83 rm -f errors
85 $ECHO "$YELLOW[-] not an intel or arm platform, cannot test qemu_mode compcov"
88 …test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc" -o "$SYS" = "aar…
89 $ECHO "$GREY[*] running afl-fuzz for qemu_mode cmplog, this will take approx 10 seconds"
91 ../afl-fuzz -m none -V07 -Q -c 0 -l 3 -i in -o out -- ./test-compcov >>errors 2>&1
93 test -n "$( ls out/default/queue/id:000001* 2>/dev/null )" && {
94 $ECHO "$GREEN[+] afl-fuzz is working correctly with qemu_mode cmplog"
96 echo CUT------------------------------------------------------------------CUT
98 echo CUT------------------------------------------------------------------CUT
99 $ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode cmplog"
102 rm -f errors
104 $ECHO "$YELLOW[-] not an intel or arm platform, cannot test qemu_mode cmplog"
107 …test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc" -o "$SYS" = "aar…
108 $ECHO "$GREY[*] running afl-fuzz for persistent qemu_mode, this will take approx 10 seconds"
111 file test-instr | grep -q 'statically linked' && IS_STATIC=1
112 test -z "$IS_STATIC" && {
113 if file test-instr | grep -q "32-bit"; then
114 # for 32-bit reduce 8 nibbles to the lower 7 nibbles
115 ADDR_LOWER_PART=`nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.//'`
117 # for 64-bit reduce 16 nibbles to the lower 9 nibbles
118 ADDR_LOWER_PART=`nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.......//'`
122 test -n "$IS_STATIC" && {
123 export AFL_QEMU_PERSISTENT_ADDR=0x`nm test-instr | grep "T main" | awk '{print $1}'`
126 …$ECHO "Info: AFL_QEMU_PERSISTENT_ADDR=$AFL_QEMU_PERSISTENT_ADDR <= $(nm test-instr | grep "T main"…
128 file test-instr
129 ../afl-fuzz -m ${MEM_LIMIT} -V07 -Q -i in -o out -- ./test-instr
132 test -n "$( ls out/default/queue/id:000002* 2>/dev/null )" && {
133 $ECHO "$GREEN[+] afl-fuzz is working correctly with persistent qemu_mode"
135 test -n "$RUNTIME" -a -n "$RUNTIMEP" && {
137 test "$DIFF" -gt 1 && { # must be at least twice as fast
140 … $ECHO "$YELLOW[-] persistent qemu_mode was not noticeable faster than standard qemu_mode"
143 $ECHO "$YELLOW[-] we got no data on executions performed? weird!"
146 echo CUT------------------------------------------------------------------CUT
148 echo CUT------------------------------------------------------------------CUT
149 $ECHO "$RED[!] afl-fuzz is not working correctly with persistent qemu_mode"
152 rm -rf in out errors
154 $ECHO "$YELLOW[-] not an intel or arm platform, cannot test persistent qemu_mode"
157 test -e ../qemu_mode/unsigaction/unsigaction32.so && {
158 ${AFL_CC} -o test-unsigaction32 -m32 test-unsigaction.c >> errors 2>&1 && {
159 ./test-unsigaction32
161 LD_PRELOAD=../qemu_mode/unsigaction/unsigaction32.so ./test-unsigaction32
163 test $RETVAL_NORMAL32 = "2" -a $RETVAL_LIBUNSIGACTION32 = "0" && {
175 $ECHO "$YELLOW[-] cannot compile test program (32 bit) for unsigaction library"
179 … $ECHO "$YELLOW[-] we cannot test qemu_mode unsigaction library (32 bit) because it is not present"
182 test -e ../qemu_mode/unsigaction/unsigaction64.so && {
183 ${AFL_CC} -o test-unsigaction64 -m64 test-unsigaction.c >> errors 2>&1 && {
184 ./test-unsigaction64
186 LD_PRELOAD=../qemu_mode/unsigaction/unsigaction64.so ./test-unsigaction64
188 test $RETVAL_NORMAL64 = "2" -a $RETVAL_LIBUNSIGACTION64 = "0" && {
201 $ECHO "$YELLOW[-] cannot compile test program (64 bit) for unsigaction library"
205 … $ECHO "$YELLOW[-] we cannot test qemu_mode unsigaction library (64 bit) because it is not present"
208 rm -rf errors test-unsigaction32 test-unsigaction64
211 $ECHO "$RED[!] gcc compilation of test targets failed - what is going on??"
215 rm -f test-instr test-compcov
217 $ECHO "$YELLOW[-] qemu_mode is not compiled, cannot test"
221 . ./test-post.sh