2024-02-10 18:23:50 +08:00
|
|
|
package pool
|
|
|
|
|
2024-03-07 15:26:30 +08:00
|
|
|
import (
|
|
|
|
"github.com/chainreactors/parsers"
|
|
|
|
"github.com/chainreactors/spray/pkg"
|
|
|
|
)
|
2024-02-10 18:23:50 +08:00
|
|
|
|
|
|
|
func newUnit(path string, source parsers.SpraySource) *Unit {
|
|
|
|
return &Unit{path: path, source: source}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Unit struct {
|
|
|
|
number int
|
2024-08-29 01:41:00 +08:00
|
|
|
host string
|
2024-02-10 18:23:50 +08:00
|
|
|
path string
|
|
|
|
source parsers.SpraySource
|
|
|
|
retry int
|
|
|
|
frontUrl string
|
|
|
|
depth int // redirect depth
|
|
|
|
}
|
2024-03-07 15:26:30 +08:00
|
|
|
|
|
|
|
func NewBaselines() *Baselines {
|
|
|
|
return &Baselines{
|
|
|
|
baselines: map[int]*pkg.Baseline{},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Baselines struct {
|
|
|
|
FailedBaselines []*pkg.Baseline
|
|
|
|
random *pkg.Baseline
|
|
|
|
index *pkg.Baseline
|
|
|
|
baselines map[int]*pkg.Baseline
|
|
|
|
}
|