Skip to content

Commit 21eb087

Browse files
author
soerlemans
committed
Added support for fractal rate limit.
1 parent 9554fef commit 21eb087

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/shortscan/shortscan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ type arguments struct {
151151
FullUrl bool `arg:"-F" help:"display the full URL for confirmed files rather than just the filename" default:"false"`
152152
NoRecurse bool `arg:"-n" help:"don't detect and recurse into subdirectories (disabled when autocomplete is disabled)" default:"false"`
153153
Stabilise bool `arg:"-s" help:"attempt to get coherent autocomplete results from an unstable server (generates more requests)" default:"false"`
154-
Rate uint `arg:"-r" help:"maximum requests per second" default:"0"`
154+
Rate float32 `arg:"-r" help:"maximum requests per second, supports floating point values" default:"0.0"`
155155
Patience int `arg:"-p" help:"patience level when determining vulnerability (0 = patient; 1 = very patient)" placeholder:"LEVEL" default:"0"`
156156
Characters string `arg:"-C" help:"filename characters to enumerate" default:"JFKGOTMYVHSPCANDXLRWEBQUIZ8549176320-_()&'!#$%@^{}~"`
157157
Autocomplete string `arg:"-a" help:"autocomplete detection mode (auto = autoselect; method = HTTP method magic; status = HTTP status; distance = Levenshtein distance; none = disable)" placeholder:"mode" default:"auto"`
@@ -1071,7 +1071,7 @@ func Run() {
10711071
// If the rate limit is a negative treat it as no rate limit
10721072
delay := args.Rate
10731073
if args.Rate != 0 {
1074-
delay = 1_000_000 / args.Rate
1074+
delay = 1_000_000.0 / args.Rate
10751075
}
10761076

10771077
// Initialize the calculated delay between requests, according to rate limit

0 commit comments

Comments
 (0)