spray/pkg/config.go

43 lines
728 B
Go
Raw Normal View History

2022-09-08 15:57:17 +08:00
package pkg
import (
"github.com/antonmedv/expr/vm"
2022-12-06 21:45:14 +08:00
"github.com/chainreactors/words/rule"
2022-09-08 15:57:17 +08:00
"net/http"
)
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 {
BaseURL string
Wordlist []string
Thread int
Timeout int
CheckPeriod int
ErrPeriod int
BreakThreshold int
Method string
Mod SprayMod
Headers http.Header
ClientType int
Fns []func(string) string
2022-12-06 21:45:14 +08:00
Rules []rule.Expression
MatchExpr *vm.Program
FilterExpr *vm.Program
OutputCh chan *Baseline
FuzzyCh chan *Baseline
2022-09-08 15:57:17 +08:00
}