mirror of
https://github.com/chainreactors/spray.git
synced 2025-06-22 02:40:41 +00:00
优化输出, 有价值(200,30x)的index也会输出到文件中
This commit is contained in:
parent
4ab500c049
commit
f30712bb7e
@ -99,7 +99,6 @@ func NewPool(ctx context.Context, config *pkg.Config) (*Pool, error) {
|
|||||||
case InitRandomSource:
|
case InitRandomSource:
|
||||||
pool.random = bl
|
pool.random = bl
|
||||||
pool.addFuzzyBaseline(bl)
|
pool.addFuzzyBaseline(bl)
|
||||||
pool.doCrawl(bl)
|
|
||||||
pool.initwg.Done()
|
pool.initwg.Done()
|
||||||
case InitIndexSource:
|
case InitIndexSource:
|
||||||
pool.index = bl
|
pool.index = bl
|
||||||
@ -246,6 +245,9 @@ func (pool *Pool) Init() error {
|
|||||||
}
|
}
|
||||||
pool.index.Collect()
|
pool.index.Collect()
|
||||||
logs.Log.Info("[baseline.index] " + pool.index.String())
|
logs.Log.Info("[baseline.index] " + pool.index.String())
|
||||||
|
if pool.index.Status == 200 || (pool.index.Status/100) == 3 {
|
||||||
|
pool.OutputCh <- pool.index
|
||||||
|
}
|
||||||
|
|
||||||
pool.initwg.Add(1)
|
pool.initwg.Add(1)
|
||||||
pool.reqPool.Invoke(newUnit(pkg.RandPath(), InitRandomSource))
|
pool.reqPool.Invoke(newUnit(pkg.RandPath(), InitRandomSource))
|
||||||
@ -512,6 +514,7 @@ func (pool *Pool) addFuzzyBaseline(bl *pkg.Baseline) {
|
|||||||
if _, ok := pool.baselines[bl.Status]; !ok && IntsContains(FuzzyStatus, bl.Status) {
|
if _, ok := pool.baselines[bl.Status]; !ok && IntsContains(FuzzyStatus, bl.Status) {
|
||||||
bl.Collect()
|
bl.Collect()
|
||||||
pool.locker.Lock()
|
pool.locker.Lock()
|
||||||
|
pool.doCrawl(bl)
|
||||||
pool.baselines[bl.Status] = bl
|
pool.baselines[bl.Status] = bl
|
||||||
pool.locker.Unlock()
|
pool.locker.Unlock()
|
||||||
logs.Log.Infof("[baseline.%dinit] %s", bl.Status, bl.String())
|
logs.Log.Infof("[baseline.%dinit] %s", bl.Status, bl.String())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user