move libdislocator, libtokencap and qbdi_mode to utils/
MODIFY
GNUmakefile
GNUmakefile
@@ -493,8 +493,6 @@ endif
code-format:
./.custom-format.py -i src/*.c
./.custom-format.py -i include/*.h
- ./.custom-format.py -i libdislocator/*.c
- ./.custom-format.py -i libtokencap/*.c
./.custom-format.py -i instrumentation/*.h
./.custom-format.py -i instrumentation/*.cc
./.custom-format.py -i instrumentation/*.c
@@ -545,8 +543,8 @@ clean:
rm -f $(PROGS) libradamsa.so afl-fuzz-document afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 afl-qemu-trace afl-gcc-fast afl-gcc-pass.so afl-g++-fast ld *.so *.8 test/unittests/*.o test/unittests/unit_maybe_alloc test/unittests/preallocable .afl-* afl-gcc afl-g++ afl-clang afl-clang++ test/unittests/unit_hash test/unittests/unit_rand
-$(MAKE) -f GNUmakefile.llvm clean
-$(MAKE) -f GNUmakefile.gcc_plugin clean
- $(MAKE) -C libdislocator clean
- $(MAKE) -C libtokencap clean
+ $(MAKE) -C utils/libdislocator clean
+ $(MAKE) -C utils/libtokencap clean
$(MAKE) -C utils/afl_network_proxy clean
$(MAKE) -C utils/socket_fuzzing clean
$(MAKE) -C utils/argv_fuzzing clean
@@ -570,8 +568,8 @@ deepclean: clean
distrib: all
-$(MAKE) -f GNUmakefile.llvm
-$(MAKE) -f GNUmakefile.gcc_plugin
- $(MAKE) -C libdislocator
- $(MAKE) -C libtokencap
+ $(MAKE) -C utils/libdislocator
+ $(MAKE) -C utils/libtokencap
$(MAKE) -C utils/aflpp_driver
$(MAKE) -C utils/afl_network_proxy
$(MAKE) -C utils/socket_fuzzing
@@ -581,8 +579,8 @@ distrib: all
.PHONY: binary-only
binary-only: all
- $(MAKE) -C libdislocator
- $(MAKE) -C libtokencap
+ $(MAKE) -C utils/libdislocator
+ $(MAKE) -C utils/libtokencap
$(MAKE) -C utils/afl_network_proxy
$(MAKE) -C utils/socket_fuzzing
$(MAKE) -C utils/argv_fuzzing
@@ -593,8 +591,8 @@ binary-only: all
source-only: all
-$(MAKE) -f GNUmakefile.llvm
-$(MAKE) -f GNUmakefile.gcc_plugin
- $(MAKE) -C libdislocator
- $(MAKE) -C libtokencap
+ $(MAKE) -C utils/libdislocator
+ $(MAKE) -C utils/libtokencap
$(MAKE) -C utils/aflpp_driver
%.8: %

MODIFY
README.md
README.md
@@ -56,6 +56,7 @@ behaviours and defaults:
editing config.h for TESTCASE_CACHE or by specifying the env variable
`AFL_TESTCACHE_SIZE` (in MB). Good values are between 50-500 (default: 50).
* examples/ got renamed to utils/
+ * libtokencap/ libdislocator/ and qdbi_mode/ were moved to utils/
## Contents
@@ -547,7 +548,7 @@ something is already included for your data format, and tell afl-fuzz to load
that dictionary by adding `-x dictionaries/FORMAT.dict`. With afl-clang-lto
you have an autodictionary generation for which you need to do nothing except
to use afl-clang-lto as the compiler. You also have the option to generate
-a dictionary yourself, see [libtokencap/README.md](libtokencap/README.md).
+a dictionary yourself, see [utils/libtokencap/README.md](utils/libtokencap/README.md).
afl-fuzz has a variety of options that help to workaround target quirks like
specific locations for the input file (`-f`), not performing deterministic

MODIFY
docs/Changelog.md
docs/Changelog.md
@@ -12,6 +12,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
### Version ++3.00a (develop)
- llvm_mode/ and gcc_plugin/ moved to instrumentation/
- examples/ renamed to utils/
+ - moved libdislocator, libtokencap and qdbi_mode to utils/
- all compilers combined to afl-cc which emulates the previous ones
- afl-llvm/gcc-rt.o merged into afl-compiler-rt.o
- afl-fuzz

MODIFY
docs/life_pro_tips.md
docs/life_pro_tips.md
@@ -13,7 +13,7 @@ See [parallel_fuzzing.md](parallel_fuzzing.md) for step-by-step tips.
## Improve the odds of spotting memory corruption bugs with libdislocator.so!
-It's easy. Consult [libdislocator/README.md](../libdislocator/README.md) for usage tips.
+It's easy. Consult [utils/libdislocator/README.md](../utils/libdislocator/README.md) for usage tips.
## Want to understand how your target parses a particular input file?

MODIFY
docs/notes_for_asan.md
docs/notes_for_asan.md
@@ -35,7 +35,7 @@ no sanitizers compiled in.
There is also the option of generating a corpus using a non-ASAN binary, and
then feeding it to an ASAN-instrumented one to check for bugs. This is faster,
and can give you somewhat comparable results. You can also try using
-libdislocator (see libdislocator/README.dislocator.md in the parent directory) as a
+libdislocator (see [utils/libdislocator/README.dislocator.md](../utils/libdislocator/README.dislocator.md) in the parent directory) as a
lightweight and hassle-free (but less thorough) alternative.
## 2) Long version

RENAME
libdislocator/Makefile
utils/libdislocator/Makefile
PREFIX ?= /usr/local
HELPER_PATH = $(PREFIX)/lib/afl
-VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2)
+VERSION = $(shell grep '^\#define VERSION ' ../../config.h | cut -d '"' -f2)
CFLAGS ?= -O3 -funroll-loops -D_FORTIFY_SOURCE=2
-CFLAGS += -I ../include/ -Wall -g -Wno-pointer-sign
+CFLAGS += -I ../../include/ -Wall -g -Wno-pointer-sign
CFLAGS_ADD=$(USEHUGEPAGE:1=-DUSEHUGEPAGE)
CFLAGS += $(CFLAGS_ADD)
all: libdislocator.so
-VPATH = ..
-libdislocator.so: libdislocator.so.c ../config.h
- $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC libdislocator.so.c -o ../$@ $(LDFLAGS)
+libdislocator.so: libdislocator.so.c ../../config.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC libdislocator.so.c -o $@ $(LDFLAGS)
+ cp -fv libdislocator.so ../../
.NOTPARALLEL: clean
clean:
rm -f *.o *.so *~ a.out core core.[1-9][0-9]*
- rm -f ../libdislocator.so
+ rm -f ../../libdislocator.so
install: all
install -m 755 -d $${DESTDIR}$(HELPER_PATH)
- install -m 755 ../libdislocator.so $${DESTDIR}$(HELPER_PATH)
+ install -m 755 ../../libdislocator.so $${DESTDIR}$(HELPER_PATH)
install -m 644 -T README.md $${DESTDIR}$(HELPER_PATH)/README.dislocator.md

RENAME
libdislocator/README.md
utils/libdislocator/README.md
RENAME
libdislocator/libdislocator.so.c
utils/libdislocator/libdislocator.so.c
RENAME
libtokencap/Makefile
utils/libtokencap/Makefile
@@ -18,10 +18,10 @@ HELPER_PATH = $(PREFIX)/lib/afl
DOC_PATH ?= $(PREFIX)/share/doc/afl
MAN_PATH ?= $(PREFIX)/share/man/man8
-VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2)
+VERSION = $(shell grep '^\#define VERSION ' ../../config.h | cut -d '"' -f2)
CFLAGS ?= -O3 -funroll-loops -D_FORTIFY_SOURCE=2
-CFLAGS += -I ../include/ -Wall -g -Wno-pointer-sign
+CFLAGS += -I ../../include/ -Wall -g -Wno-pointer-sign
UNAME_S =$(shell uname -s)# GNU make
@@ -68,9 +68,9 @@ LDFLAGS += $(_____OS_DL)
#endif
all: $(TARGETS)
-VPATH = ..
-libtokencap.so: libtokencap.so.c ../config.h
- $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC $< -o ../$@ $(LDFLAGS)
+libtokencap.so: libtokencap.so.c ../../config.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -shared -fPIC $< -o $@ $(LDFLAGS)
+ cp -f libtokencap.so ../../
.NOTPARALLEL: clean
@@ -86,9 +86,9 @@ debug:
clean:
rm -f *.o *.so *~ a.out core core.[1-9][0-9]*
- rm -f ../libtokencap.so
+ rm -fv ../../libtokencap.so
install: all
install -m 755 -d $${DESTDIR}$(HELPER_PATH)
- install -m 755 ../libtokencap.so $${DESTDIR}$(HELPER_PATH)
+ install -m 755 ../../libtokencap.so $${DESTDIR}$(HELPER_PATH)
install -m 644 -T README.md $${DESTDIR}$(DOC_PATH)/README.tokencap.md

RENAME
libtokencap/README.md
utils/libtokencap/README.md
RENAME
libtokencap/libtokencap.so.c
utils/libtokencap/libtokencap.so.c
RENAME
qbdi_mode/README.md
utils/qbdi_mode/README.md
RENAME
qbdi_mode/assets/screen1.png
utils/qbdi_mode/assets/screen1.png
RENAME
qbdi_mode/build.sh
utils/qbdi_mode/build.sh
@@ -51,7 +51,7 @@ ${compiler_prefix}${CC} -shared -o libdemo.so demo-so.c -w -g
echo "[+] Building afl-fuzz for Android"
# build afl-fuzz
-cd ..
-${compiler_prefix}${CC} -DANDROID_DISABLE_FANCY=1 -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -I include/ -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DDOC_PATH=\"/usr/local/share/doc/afl\" -Wno-unused-function src/afl-fuzz-*.c src/afl-fuzz.c src/afl-common.c src/afl-sharedmem.c src/afl-forkserver.c -o qbdi_mode/afl-fuzz -ldl -w
+cd ../..
+${compiler_prefix}${CC} -DANDROID_DISABLE_FANCY=1 -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -I include/ -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DDOC_PATH=\"/usr/local/share/doc/afl\" -Wno-unused-function src/afl-fuzz-*.c src/afl-fuzz.c src/afl-common.c src/afl-sharedmem.c src/afl-forkserver.c -o utils/qbdi_mode/afl-fuzz -ldl -w
echo "[+] All done. Enjoy!"

RENAME
qbdi_mode/demo-so.c
utils/qbdi_mode/demo-so.c
RENAME
qbdi_mode/template.cpp
utils/qbdi_mode/template.cpp
move libdislocator, libtokencap and qbdi_mode to utils/