Add rate-limit options and parsing

Signed-off-by: Casper Guldbech Nielsen <whopsec@protonmail.com>
dev
Casper Guldbech Nielsen 2020-09-12 15:41:24 +02:00
parent d94dcf84d3
commit a7c4fb8ac1
1 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,7 @@ type Options struct {
ProxySocksURL string // ProxySocksURL is the URL for the proxy socks server
CustomHeaders requests.CustomHeaders // Custom global headers
TemplatesDirectory string // TemplatesDirectory is the directory to use for storing templates
RateLimit int // Rate-Limit of requests per specified target
}
type multiStringFlag []string
@ -78,6 +79,7 @@ func ParseOptions() *Options {
flag.BoolVar(&options.JSONRequests, "json-requests", false, "Write requests/responses for matches in JSON output")
flag.BoolVar(&options.EnableProgressBar, "pbar", false, "Enable the progress bar")
flag.BoolVar(&options.TemplateList, "tl", false, "List available templates")
flag.IntVar(&options.RateLimit, "rl", 0, "Rate-Limit of requests per specified target") // 0 as default to turn the flag "off"
flag.Parse()