diff --git a/README.md b/README.md index 24fca38..51575ea 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,17 @@ What does it do? ## Usage ``` - Usage of /tmp/go-build2863756334/b001/exe/main: - + Usage of /tmp/go-build262560291/b001/exe/concurrency: -address string - IP address to bind the web ui server to. (default "127.0.0.1") + IP address to bind the web UI server to. (default "127.0.0.1") -dictionary string File to use for enumeration. (default "db/apache-list") -domain string domain to scan + -extension string + File extension. (default "js") -shodan string - shadan api key + shodan API key -verbose Verbosity ``` diff --git a/cmd/bruter/main.go b/cmd/bruter/main.go index 8f9cb83..fa320f0 100644 --- a/cmd/bruter/main.go +++ b/cmd/bruter/main.go @@ -3,16 +3,6 @@ package main import ( "flag" "fmt" - "math" - "net/http" - "os" - "strings" - "sync" - "syscall" - "time" - - "os/signal" - "github.com/CyberRoute/bruter/pkg/config" "github.com/CyberRoute/bruter/pkg/fuzzer" "github.com/CyberRoute/bruter/pkg/handlers" @@ -23,6 +13,14 @@ import ( "github.com/fatih/color" "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "math" + "net/http" + "os" + "os/signal" + "strings" + "sync" + "syscall" + "time" ) type workerContext struct { @@ -42,6 +40,7 @@ var ( Domain = flag.String("domain", "", "domain to scan") Apikey = flag.String("shodan", "", "shodan API key") 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.") Verbose = flag.Bool("verbose", false, "Verbosity") ) @@ -137,7 +136,7 @@ func createQueue(mu *sync.Mutex, domain string, list []string, shift, total int, for index, payload := range list { modifiedIndex := index + shift - payload = strings.ReplaceAll(payload, "%EXT%", "js") + payload = strings.ReplaceAll(payload, "%EXT%", *Extension) progress := 100 * float32(modifiedIndex) / float32(total) progress = float32(math.Round(float64(progress))) queue.Add(async.Job(&workerContext{