spray/internal/config.go

54 lines
1.0 KiB
Go
Raw Normal View History

2024-02-08 15:26:01 +08:00
package internal
2022-09-08 15:57:17 +08:00
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
2024-02-07 01:29:05 +08:00
ProxyAddr string
2023-03-24 14:20:31 +08:00
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
Scope []string
2023-03-24 14:20:31 +08:00
Active bool
Bak bool
Common bool
2023-05-04 12:04:59 +08:00
Retry int
2023-03-24 14:20:31 +08:00
RandomUserAgent bool
Random string
Index string
2022-09-08 15:57:17 +08:00
}