spray/internal/pool/config.go

59 lines
1.2 KiB
Go
Raw Normal View History

2024-02-10 18:23:50 +08:00
package pool
2022-09-08 15:57:17 +08:00
import (
2024-02-10 18:23:50 +08:00
"github.com/chainreactors/spray/pkg"
"github.com/chainreactors/words/rule"
2024-06-06 18:11:45 +08:00
"github.com/expr-lang/expr/vm"
2024-02-10 18:23:50 +08:00
"sync"
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
2024-05-30 23:33:57 +08:00
ProcessCh chan *pkg.Baseline
2024-02-10 18:23:50 +08:00
OutputCh chan *pkg.Baseline
FuzzyCh chan *pkg.Baseline
2024-07-14 04:08:50 +08:00
Outwg *sync.WaitGroup
2023-03-24 14:20:31 +08:00
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
2024-02-08 16:28:27 +08:00
AppendWords []string
2023-03-24 14:20:31 +08:00
Fuzzy bool
IgnoreWaf bool
Crawl bool
Scope []string
2023-03-24 14:20:31 +08:00
Active bool
Bak bool
Common bool
RetryLimit int
2023-03-24 14:20:31 +08:00
RandomUserAgent bool
Random string
Index string
2022-09-08 15:57:17 +08:00
}