spray/pkg/config.go

49 lines
915 B
Go
Raw Normal View History

2022-09-08 15:57:17 +08:00
package pkg
import (
"github.com/antonmedv/expr/vm"
"github.com/chainreactors/words/rule"
2022-09-08 15:57:17 +08:00
)
type SprayMod int
const (
PathSpray SprayMod = iota + 1
HostSpray
ParamSpray
CustomSpray
)
2022-09-15 19:27:07 +08:00
var ModMap = map[string]SprayMod{
"path": PathSpray,
"host": HostSpray,
}
2022-09-08 15:57:17 +08:00
type Config struct {
2023-03-24 14:20:31 +08:00
BaseURL string
Thread int
Wordlist []string
Timeout int
RateLimit int
CheckPeriod int
ErrPeriod int32
BreakThreshold int32
Method string
Mod SprayMod
Headers map[string]string
ClientType int
MatchExpr *vm.Program
FilterExpr *vm.Program
RecuExpr *vm.Program
AppendRule *rule.Program
OutputCh chan *Baseline
FuzzyCh chan *Baseline
Fuzzy bool
IgnoreWaf bool
Crawl bool
Active bool
Bak bool
Common bool
RandomUserAgent bool
2022-09-08 15:57:17 +08:00
}