From 1f522ca0005c5dd04dfb246b04f2eb5151cbf85b Mon Sep 17 00:00:00 2001 From: CyberRoute Date: Fri, 23 Feb 2024 14:07:53 +0100 Subject: [PATCH] adding minimal stats on the wordlist --- cmd/bruter/main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/bruter/main.go b/cmd/bruter/main.go index 590b3f1..3a57c4d 100644 --- a/cmd/bruter/main.go +++ b/cmd/bruter/main.go @@ -31,10 +31,15 @@ type workerContext struct { Verbose bool } +type Statistics struct { + Inputs uint64 +} + const portNumber = ":8080" var app config.AppConfig var session *scs.SessionManager +var stats Statistics var ( Domain = flag.String("domain", "", "Domain to scan") @@ -59,6 +64,7 @@ func main() { go func() { <-signals r.Println("\nINTERRUPTING ...") + fmt.Printf("Wordlist of %d paths\n", stats.Inputs) os.Exit(0) }() @@ -115,6 +121,7 @@ func main() { list := make([]string, 0) for line := range linesChan { + stats.Inputs++ list = append(list, line) } @@ -124,7 +131,8 @@ func main() { queue.WaitDone() - fmt.Println("\nAll tasks completed, press Ctrl-C to quit.") + logger.Info().Msg(fmt.Sprintf("Wordlist of %d paths", stats.Inputs)) + logger.Info().Msg("All tasks completed, press Ctrl-C to quit.") select {} }