Add flag for statistics

This commit is contained in:
maride 2021-04-20 10:36:04 +02:00
parent 10e940126d
commit da2d1f47e5

View File

@ -11,6 +11,7 @@ import (
var ( var (
outputDirectory string outputDirectory string
printStats bool
) )
func main() { func main() {
@ -34,7 +35,9 @@ func main() {
go watchdog.WatchFuzzers(outputDirectory) go watchdog.WatchFuzzers(outputDirectory)
// Start stat printer // Start stat printer
go stats.PrintStats() if printStats {
go stats.PrintStats()
}
// Listen for incoming connections // Listen for incoming connections
listenErr := net.Listen(outputDirectory) listenErr := net.Listen(outputDirectory)
@ -46,4 +49,5 @@ func main() {
// Registers flags which are required by multiple modules and need to be handled here // Registers flags which are required by multiple modules and need to be handled here
func RegisterGlobalFlags() { func RegisterGlobalFlags() {
flag.StringVar(&outputDirectory, "fuzzer-directory", "", "The output directory of the fuzzer(s)") flag.StringVar(&outputDirectory, "fuzzer-directory", "", "The output directory of the fuzzer(s)")
flag.BoolVar(&printStats, "print-stats", true, "Print traffic statistics every few seconds")
} }