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 (
outputDirectory string
printStats bool
)
func main() {
@ -34,7 +35,9 @@ func main() {
go watchdog.WatchFuzzers(outputDirectory)
// Start stat printer
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")
}