mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 04:18:06 +00:00
final touches for afl_network_proxy
This commit is contained in:
@ -10,27 +10,19 @@ ifdef STATIC
|
|||||||
CFLAGS += -static
|
CFLAGS += -static
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef USE_DEFLATE
|
ifeq "$(shell echo '$(HASH)include <libdeflate.h>@int main() { struct libdeflate_compressor *d = libdeflate_alloc_compressor(1); return 0;}' | tr @ '\n' | $(CC) $(CFLAGS) -x c - -o .test2 -ldeflate 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1"
|
||||||
CFLAGS += -DUSE_DEFLATE=1
|
CFLAGS += -ldeflate -DUSE_DEFLATE=1
|
||||||
LDFLAGS += -ldeflate
|
$(info libdeflate-dev was detected, using compressing)
|
||||||
$(info activating libdeflate-dev for compressing)
|
else
|
||||||
|
$(warn did not find libdeflate-dev, cannot use compression)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Disables because compression is slower
|
|
||||||
# sending 64kb instead of compressing to 112bytes is slower? weird ...
|
|
||||||
#ifeq "$(shell echo '$(HASH)include <libdeflate.h>@int main() { struct libdeflate_compressor *d = libdeflate_alloc_compressor(1); return 0;}' | tr @ '\n' | $(CC) $(CFLAGS) -x c - -o .test2 -ldeflate 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1"
|
|
||||||
# CFLAGS += -ldeflate -DUSE_DEFLATE=1
|
|
||||||
# $(info libdeflate-dev was detected, using compressing)
|
|
||||||
#else
|
|
||||||
# $(warn did not find libdeflate-dev, cannot use compression)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
all: $(PROGRAMS)
|
all: $(PROGRAMS)
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo make options:
|
@echo make options:
|
||||||
echo STATIC - build as static binaries
|
@echo STATIC - build as static binaries
|
||||||
echo USE_DEFLATE - build with compression library
|
@echo COMPRESS_TESTCASES - compress test cases
|
||||||
|
|
||||||
afl-network-client: afl-network-client.c
|
afl-network-client: afl-network-client.c
|
||||||
$(CC) $(CFLAGS) -I../../include -o afl-network-client afl-network-client.c $(LDFLAGS)
|
$(CC) $(CFLAGS) -I../../include -o afl-network-client afl-network-client.c $(LDFLAGS)
|
||||||
@ -44,5 +36,5 @@ clean:
|
|||||||
install: all
|
install: all
|
||||||
install -d -m 755 $${DESTDIR}$(BIN_PATH) $${DESTDIR}$(DOC_PATH)
|
install -d -m 755 $${DESTDIR}$(BIN_PATH) $${DESTDIR}$(DOC_PATH)
|
||||||
install -m 755 $(PROGRAMS) $${DESTDIR}$(BIN_PATH)
|
install -m 755 $(PROGRAMS) $${DESTDIR}$(BIN_PATH)
|
||||||
install -m 644 README.md $${DESTDIR}$(DOC_PATH)/README.network_proxy.md
|
install -T -m 644 README.md $${DESTDIR}$(DOC_PATH)/README.network_proxy.md
|
||||||
|
|
||||||
|
@ -16,9 +16,12 @@ Note that the impact on fuzzing speed will be huge, expect a loss of 90%.
|
|||||||
|
|
||||||
Just type `make` and let the autodetection do everything for you.
|
Just type `make` and let the autodetection do everything for you.
|
||||||
|
|
||||||
Note that compression is supported but currently disabled. It seems that
|
Note that you will get a 40-50% performance increase if you have libdeflate-dev
|
||||||
sending 64kb of map data over TCP is faster than compressing it with the
|
installed. The GNUmakefile will autodetect it if present.
|
||||||
fastest algorithm and options to 112 byte and sending this. Weird.
|
|
||||||
|
If your target has large test cases (10+kb) that are ascii only or large chunks
|
||||||
|
of zero blocks then set `CFLAGS=-DCOMPRESS_TESTCASES=1` to compress them.
|
||||||
|
For most targets this hurts performance though so it is disabled by default.
|
||||||
|
|
||||||
### on the target
|
### on the target
|
||||||
|
|
||||||
@ -29,7 +32,7 @@ e.g.:
|
|||||||
$ afl-network-server -i 1111 -m 25M -t 1000 -- /bin/target -f @@
|
$ afl-network-server -i 1111 -m 25M -t 1000 -- /bin/target -f @@
|
||||||
```
|
```
|
||||||
|
|
||||||
### on the fuzzing master
|
### on the (afl-fuzz) master
|
||||||
|
|
||||||
Just run afl-fuzz with your normal options, however the target should be
|
Just run afl-fuzz with your normal options, however the target should be
|
||||||
`afl-network-client` with the IP and PORT of the `afl-network-server` and
|
`afl-network-client` with the IP and PORT of the `afl-network-server` and
|
||||||
|
Reference in New Issue
Block a user