aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/config.h6
-rw-r--r--src/afl-fuzz-run.c2
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;