1
1
Fork 0
mirror of https://github.com/OJ/gobuster.git synced 2024-05-28 17:06:05 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
firefart c99e164923 also respect quiet mode 2024-02-02 18:45:22 +01:00
firefart 591136d4da taskfile 2024-02-02 13:28:50 +01:00
2 changed files with 14 additions and 14 deletions

View File

@ -10,11 +10,11 @@ tasks:
- go mod tidy -v
build:
aliases: [default, linux]
aliases: [default]
cmds:
- go fmt ./...
- go vet ./...
- go build -o {{.PROGRAM}}
- go build -o {{.OUTPUT_FILE | default .PROGRAM}}
env:
CGO_ENABLED: 0
@ -29,6 +29,8 @@ tasks:
windows:
cmds:
- task: build
vars:
OUTPUT_FILE: "{{.PROGRAM}}.exe"
env:
CGO_ENABLED: 0
GOOS: windows

View File

@ -36,7 +36,7 @@ func resultWorker(g *libgobuster.Gobuster, filename string, wg *sync.WaitGroup)
}
if s != "" {
s = strings.TrimSpace(s)
if g.Opts.NoProgress {
if g.Opts.NoProgress || g.Opts.Quiet {
_, _ = fmt.Printf("%s\n", s)
} else {
// only print the clear line when progress output is enabled
@ -89,7 +89,6 @@ func messageWorker(g *libgobuster.Gobuster, wg *sync.WaitGroup) {
}
func printProgress(g *libgobuster.Gobuster) {
if !g.Opts.Quiet && !g.Opts.NoProgress {
requestsIssued := g.Progress.RequestsIssued()
requestsExpected := g.Progress.RequestsExpected()
if g.Opts.Wordlist == "-" {
@ -101,7 +100,6 @@ func printProgress(g *libgobuster.Gobuster) {
_, _ = fmt.Fprint(os.Stderr, s)
}
}
}
// progressWorker outputs the progress every tick. It will stop once cancel() is called
// on the context