Skip to content

Commit

Permalink
adding cmd arg workers
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Feb 14, 2024
1 parent a6a7894 commit 223b9c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/bruter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var (
Address = flag.String("address", "127.0.0.1", "IP address to bind the web UI server to.")
Extension = flag.String("extension", "js", "File extension.")
Dictionary = flag.String("dictionary", "db/apache-list", "File to use for enumeration.")
Workers = flag.Int("workers", 0, "Default is 0, if workers is less than or equal than zero, it will be auto scaled to the number of logical CPUs usable by the current process.")
Verbose = flag.Bool("verbose", false, "Verbosity")
)

Expand Down Expand Up @@ -129,7 +130,7 @@ func readDictionary(file *os.File) []string {
}

func createQueue(mu *sync.Mutex, domain string, list []string, shift, total int, verbose bool) *async.WorkQueue {
queue := async.NewQueue(0, func(arg async.Job) {
queue := async.NewQueue(*Workers, func(arg async.Job) {
ctx := arg.(*workerContext)
fuzzer.Dirsearch(ctx.Mu, &app, ctx.Domain, ctx.Path, ctx.Progress, ctx.Verbose)
})
Expand Down

0 comments on commit 223b9c4

Please sign in to comment.