1
1
mirror of https://github.com/OJ/gobuster.git synced 2024-09-28 02:55:57 +02:00

Revert "implement delay, fix #147"

this will not be the delay between requests :/ need to find a better
way

This reverts commit d86d958346.
This commit is contained in:
Christian Mehlmauer 2019-05-30 01:31:38 +02:00
parent d86d958346
commit e31432915d
No known key found for this signature in database
GPG Key ID: DCF54A05D6E62591
4 changed files with 0 additions and 19 deletions

View File

@ -45,7 +45,6 @@ All funds that are donated to this project will be donated to charity. A full lo
* Performance Optimizations and better connection handling
* Ability to bruteforce vhost names
* Option to supply custom HTTP headers
* Added new `--delay` option to sleep between requests
## Available modes

View File

@ -95,11 +95,6 @@ func parseGlobalOptions() (*libgobuster.Options, error) {
return nil, fmt.Errorf("invalid value for noprogress: %v", err)
}
globalopts.Delay, err = rootCmd.Flags().GetDuration("delay")
if err != nil {
return nil, fmt.Errorf("invalid value for delay: %v", err)
}
return globalopts, nil
}
@ -120,5 +115,4 @@ func init() {
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "Verbose output (errors)")
rootCmd.PersistentFlags().BoolP("quiet", "q", false, "Don't print the banner and other noise")
rootCmd.PersistentFlags().BoolP("noprogress", "z", false, "Don't display progress")
rootCmd.PersistentFlags().DurationP("delay", "", 0, "Delay between requests")
}

View File

@ -8,7 +8,6 @@ import (
"os"
"strings"
"sync"
"time"
)
// SetupFunc is the "setup" function prototype for implementations
@ -178,14 +177,6 @@ Scan:
break Scan
case wordChan <- scanner.Text():
}
// delay between requests
// use select here to be able to cancel the sleep
select {
case <-g.context.Done():
break Scan
case <-time.After(g.Opts.Delay):
break
}
}
close(wordChan)
workerGroup.Wait()

View File

@ -1,10 +1,7 @@
package libgobuster
import "time"
// Options helds all options that can be passed to libgobuster
type Options struct {
Delay time.Duration
Threads int
Wordlist string
OutputFilename string