Skip to content

Commit

Permalink
adding minimal stats on the wordlist
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Feb 23, 2024
1 parent 713ee5c commit 1f522ca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/bruter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -59,6 +64,7 @@ func main() {
go func() {
<-signals
r.Println("\nINTERRUPTING ...")
fmt.Printf("Wordlist of %d paths\n", stats.Inputs)
os.Exit(0)
}()

Expand Down Expand Up @@ -115,6 +121,7 @@ func main() {

list := make([]string, 0)
for line := range linesChan {
stats.Inputs++
list = append(list, line)
}

Expand All @@ -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 {}
}

Expand Down

0 comments on commit 1f522ca

Please sign in to comment.