Skip to content

Commit

Permalink
adding extension from the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Feb 13, 2024
1 parent 90ccbf0 commit a6a7894
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
21 changes: 10 additions & 11 deletions cmd/bruter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -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")
)
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit a6a7894

Please sign in to comment.