Skip to content

Commit a6a7894

Browse files
committed
adding extension from the cli
1 parent 90ccbf0 commit a6a7894

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ What does it do?
1717

1818
## Usage
1919
```
20-
Usage of /tmp/go-build2863756334/b001/exe/main:
21-
20+
Usage of /tmp/go-build262560291/b001/exe/concurrency:
2221
-address string
23-
IP address to bind the web ui server to. (default "127.0.0.1")
22+
IP address to bind the web UI server to. (default "127.0.0.1")
2423
-dictionary string
2524
File to use for enumeration. (default "db/apache-list")
2625
-domain string
2726
domain to scan
27+
-extension string
28+
File extension. (default "js")
2829
-shodan string
29-
shadan api key
30+
shodan API key
3031
-verbose
3132
Verbosity
3233
```

cmd/bruter/main.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ package main
33
import (
44
"flag"
55
"fmt"
6-
"math"
7-
"net/http"
8-
"os"
9-
"strings"
10-
"sync"
11-
"syscall"
12-
"time"
13-
14-
"os/signal"
15-
166
"github.com/CyberRoute/bruter/pkg/config"
177
"github.com/CyberRoute/bruter/pkg/fuzzer"
188
"github.com/CyberRoute/bruter/pkg/handlers"
@@ -23,6 +13,14 @@ import (
2313
"github.com/fatih/color"
2414
"github.com/rs/zerolog"
2515
"github.com/rs/zerolog/log"
16+
"math"
17+
"net/http"
18+
"os"
19+
"os/signal"
20+
"strings"
21+
"sync"
22+
"syscall"
23+
"time"
2624
)
2725

2826
type workerContext struct {
@@ -42,6 +40,7 @@ var (
4240
Domain = flag.String("domain", "", "domain to scan")
4341
Apikey = flag.String("shodan", "", "shodan API key")
4442
Address = flag.String("address", "127.0.0.1", "IP address to bind the web UI server to.")
43+
Extension = flag.String("extension", "js", "File extension.")
4544
Dictionary = flag.String("dictionary", "db/apache-list", "File to use for enumeration.")
4645
Verbose = flag.Bool("verbose", false, "Verbosity")
4746
)
@@ -137,7 +136,7 @@ func createQueue(mu *sync.Mutex, domain string, list []string, shift, total int,
137136

138137
for index, payload := range list {
139138
modifiedIndex := index + shift
140-
payload = strings.ReplaceAll(payload, "%EXT%", "js")
139+
payload = strings.ReplaceAll(payload, "%EXT%", *Extension)
141140
progress := 100 * float32(modifiedIndex) / float32(total)
142141
progress = float32(math.Round(float64(progress)))
143142
queue.Add(async.Job(&workerContext{

0 commit comments

Comments
 (0)