这是indexloc提供的服务,不要输入任何密码
Skip to content

panic: runtime error: integer divide by zero #696

@ghost

Description

I ran a scan with a rate set to 15 and wanted to remove/disable the rate limit. Since it's set to 0 by default, I tried to set it to zeor, which resulted in a divide by zero crash.

[INFO] ------ PAUSING ------

entering interactive mode
type "help" for a list of commands, or ENTER to resume.
> rate 0
panic: runtime error: integer divide by zero

goroutine 7 [running]:
github.com/ffuf/ffuf/v2/pkg/ffuf.(*RateThrottle).ChangeRate(0xc0001a42b5?, 0x6?)
        /home/<redacted>/ffuf/pkg/ffuf/rate.go:68 +0x1ce
github.com/ffuf/ffuf/v2/pkg/interactive.(*interactive).handleInput(0xc0001c4ee0, {0xc0000ed016?, 0x0?, 0x0?})
        /home/<redacted>/ffuf/pkg/interactive/termhandler.go:190 +0xa05
github.com/ffuf/ffuf/v2/pkg/interactive.Handle(0x0?)
        /home/<redacted>/ffuf/pkg/interactive/termhandler.go:28 +0x105
main.main.func1()
        /home/<redacted>/ffuf/main.go:246 +0x1d
created by main.main
        /home/<redacted>/ffuf/main.go:245 +0x9dc
$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions