diff options
author | Edznux <edznux@gmail.com> | 2020-10-03 23:56:55 +0200 |
---|---|---|
committer | Edznux <edznux@gmail.com> | 2020-10-03 23:56:55 +0200 |
commit | 26dcddab0cdb3ca662746b1fd02cd58de3266269 (patch) | |
tree | cdced0e1684c0f3400a828adee30710c7b89a945 | |
parent | 223974336196a8f3617548e8ca88ee084794ed60 (diff) | |
download | afl++-26dcddab0cdb3ca662746b1fd02cd58de3266269.tar.gz |
Add config ifdef
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | src/afl-fuzz-run.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 77407d50..104276e3 100644 --- a/include/config.h +++ b/include/config.h @@ -41,6 +41,12 @@ #define USE_COLOR +/* Enable sending statistics over a StatsD daemon. +Server config can be adjusted with AFL_STATSD_HOST and AFL_STATSD_PORT env var. +*/ + +#define USE_STATSD + /* If you want to have the original afl internal memory corruption checks. Disabled by default for speed. it is better to use "make ASAN_BUILD=1". */ diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c index 8dc0b334..b7c4ae05 100644 --- a/src/afl-fuzz-run.c +++ b/src/afl-fuzz-run.c @@ -901,10 +901,12 @@ common_fuzz_stuff(afl_state_t *afl, u8 *out_buf, u32 len) { afl->stage_cur + 1 == afl->stage_max) { show_stats(afl); + #ifdef USE_STATSD if(send_statsd_metric(afl)){ //Change me to something realistic; don't fail on connection / lookup fail for metrics... exit(1); } + #endif } return 0; |