2024-02-10 18:23:50 +08:00
|
|
|
package pool
|
2022-09-08 15:57:17 +08:00
|
|
|
|
|
|
|
import (
|
2022-11-21 20:44:02 +08:00
|
|
|
"github.com/antonmedv/expr/vm"
|
2024-02-10 18:23:50 +08:00
|
|
|
"github.com/chainreactors/spray/pkg"
|
2023-01-05 22:42:07 +08:00
|
|
|
"github.com/chainreactors/words/rule"
|
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-02-10 18:23:50 +08:00
|
|
|
OutputCh chan *pkg.Baseline
|
|
|
|
FuzzyCh chan *pkg.Baseline
|
|
|
|
OutLocker *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
|
2023-04-14 20:05:21 +08:00
|
|
|
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
|
2023-06-03 22:24:52 +08:00
|
|
|
Random string
|
|
|
|
Index string
|
2022-09-08 15:57:17 +08:00
|
|
|
}
|