From da2d1f47e5eb26fa3d6e01abbfac751662d037f7 Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 20 Apr 2021 10:36:04 +0200 Subject: [PATCH] Add flag for statistics --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e781f9b..0f3ed3b 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( var ( outputDirectory string + printStats bool ) func main() { @@ -34,7 +35,9 @@ func main() { go watchdog.WatchFuzzers(outputDirectory) // Start stat printer - go stats.PrintStats() + if printStats { + go stats.PrintStats() + } // Listen for incoming connections listenErr := net.Listen(outputDirectory) @@ -46,4 +49,5 @@ func main() { // Registers flags which are required by multiple modules and need to be handled here func RegisterGlobalFlags() { flag.StringVar(&outputDirectory, "fuzzer-directory", "", "The output directory of the fuzzer(s)") + flag.BoolVar(&printStats, "print-stats", true, "Print traffic statistics every few seconds") }