这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Changed
- Explicitly allow TLS1.0
- Fix markdown output file format
- Fixed divide by 0 error when setting rate limit to 0 manually.

- v2.0.0
- New
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* [Daviey](https://github.com/Daviey)
* [delic](https://github.com/delic)
* [denandz](https://github.com/denandz)
* [Ephex2](https://github.com/Ephex2)
* [erbbysam](https://github.com/erbbysam)
* [eur0pa](https://github.com/eur0pa)
* [fabiobauer](https://github.com/fabiobauer)
Expand Down Expand Up @@ -46,4 +47,3 @@
* [SolomonSklash](https://github.com/SolomonSklash)
* [TomNomNom](https://github.com/tomnomnom)
* [xfgusta](https://github.com/xfgusta)

7 changes: 6 additions & 1 deletion pkg/ffuf/rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ func (r *RateThrottle) CurrentRate() int64 {
}

func (r *RateThrottle) ChangeRate(rate int) {
ratemicros := 1000000 / rate
ratemicros := 0 // set default to 0, avoids integer divide by 0 error

if rate != 0 {
ratemicros = 1000000 / rate
}

r.RateLimiter.Stop()
r.RateLimiter = time.NewTicker(time.Microsecond * time.Duration(ratemicros))
r.Config.Rate = int64(rate)
Expand Down