diff --git a/custom_mutators/aflpp/standalone/Makefile b/custom_mutators/aflpp/standalone/Makefile index d7bc840d..b01adf07 100644 --- a/custom_mutators/aflpp/standalone/Makefile +++ b/custom_mutators/aflpp/standalone/Makefile @@ -4,7 +4,7 @@ CFLAGS = -O3 -funroll-loops -fPIC all: aflpp-standalone aflpp-standalone: aflpp-standalone.c - $(CC) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -o aflpp-standalone aflpp-standalone.c ../../../src/afl-performance.c ../../../src/afl-fuzz-extras.c ../../../src/afl-common.c + $(CC) $(CFLAGS) -w -DBIN_PATH=\"foo\" -I../../../include -I. -o aflpp-standalone aflpp-standalone.c ../../../src/afl-performance.c ../../../src/afl-fuzz-extras.c ../../../src/afl-common.c clean: rm -f *.o *~ aflpp-standalone core diff --git a/custom_mutators/autotokens/standalone/Makefile b/custom_mutators/autotokens/standalone/Makefile index 8d5baf13..36550b76 100644 --- a/custom_mutators/autotokens/standalone/Makefile +++ b/custom_mutators/autotokens/standalone/Makefile @@ -1,19 +1,20 @@ -CFLAGS = -g -O3 -funroll-loops -fPIC -D_STANDALONE_MODULE=1 -Wno-implicit-function-declaration +CFLAGS = -g -O3 -funroll-loops -fPIC -D_STANDALONE_MODULE=1 -Wno-pointer-sign CXXFLAGS= -g -O3 -funroll-loops -fPIC -D_STANDALONE_MODULE=1 all: autotokens-standalone autotokens.o: ../autotokens.cpp - $(CXX) $(CXXFLAGS) -I../../../include -I. -I../.. -c ../autotokens.cpp + $(CXX) $(CXXFLAGS) -g -I../../../include -I. -I../.. -c ../autotokens.cpp autotokens-standalone: autotokens-standalone.c autotokens.o - $(CC) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -c autotokens-standalone.c - $(CC) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-performance.c - $(CC) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-fuzz-extras.c - $(CC) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-fuzz-queue.c - $(CC) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-common.c - $(CXX) $(CFLAGS) -DBIN_PATH=\"foo\" -I../../../include -I. -o autotokens-standalone *.o + $(CC) $(CFLAGS) -g -DBIN_PATH=\"foo\" -I../../../include -I. -c autotokens-standalone.c + $(CC) $(CFLAGS) -g -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-performance.c + $(CC) $(CFLAGS) -g -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-fuzz-extras.c + $(CC) $(CFLAGS) -g -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-fuzz-queue.c + $(CC) $(CFLAGS) -g -DBIN_PATH=\"foo\" -I../../../include -I. -c ../../../src/afl-common.c + $(CXX) $(CFLAGS) -g -DBIN_PATH=\"foo\" -I../../../include -I. -o autotokens-standalone *.o + @rm -f ../../../src/afl-common.o ../../../src/afl-fuzz-queue.o ../../../src/afl-fuzz-extras.o ../../../src/afl-performance.o clean: rm -f *.o *~ autotokens-standalone core diff --git a/custom_mutators/autotokens/standalone/autotokens-standalone.c b/custom_mutators/autotokens/standalone/autotokens-standalone.c index e7a09cb3..794cbed6 100644 --- a/custom_mutators/autotokens/standalone/autotokens-standalone.c +++ b/custom_mutators/autotokens/standalone/autotokens-standalone.c @@ -1,15 +1,28 @@ #include "afl-fuzz.h" #include "afl-mutations.h" +#include "forkserver.h" #include #include static int max_havoc = 16, verbose; -static unsigned char *dict, *mh = "16"; +static char _mh[4] = "16"; +static char *dict, *mh = _mh; extern int module_disabled; void *afl_custom_init(afl_state_t *, unsigned int); +u8 afl_custom_queue_get(void *data, const u8 *filename); +size_t afl_custom_fuzz(void *data, u8 *buf, size_t buf_size, u8 **out_buf, + u8 *add_buf, size_t add_buf_size, size_t max_size); + +u32 write_to_testcase(afl_state_t *afl, void **mem, u32 a, u32 b) { + return 0; +} +fsrv_run_result_t fuzz_run_target(afl_state_t *afl, afl_forkserver_t *fsrv, + u32 i) { +return FSRV_RUN_OK; + } int main(int argc, char *argv[]) { @@ -144,7 +157,7 @@ int main(int argc, char *argv[]) { if (dict) { - load_extras(afl, dict); + load_extras(afl, (u8*)dict); if (verbose) fprintf(stderr, "Loaded dictionary: %s (%u entries)\n", dict, afl->extras_cnt);