mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 19:50:18 +00:00
rm same status with random baseline filter
This commit is contained in:
parent
784776edb3
commit
6808a9a5f8
@ -407,8 +407,10 @@ func (pool *BrutePool) Invoke(v interface{}) {
|
|||||||
// 异步进行性能消耗较大的深度对比
|
// 异步进行性能消耗较大的深度对比
|
||||||
pool.processCh <- bl
|
pool.processCh <- bl
|
||||||
if int(pool.Statistor.ReqTotal)%pool.CheckPeriod == 0 {
|
if int(pool.Statistor.ReqTotal)%pool.CheckPeriod == 0 {
|
||||||
|
// 间歇插入check waf的探针
|
||||||
pool.doCheck()
|
pool.doCheck()
|
||||||
} else if pool.failedCount%pool.ErrPeriod == 0 {
|
} else if pool.failedCount%pool.ErrPeriod == 0 {
|
||||||
|
// 发生错误时插入探针, 如果超过阈值提前退出
|
||||||
atomic.AddInt32(&pool.failedCount, 1)
|
atomic.AddInt32(&pool.failedCount, 1)
|
||||||
pool.doCheck()
|
pool.doCheck()
|
||||||
}
|
}
|
||||||
@ -553,9 +555,9 @@ func (pool *BrutePool) PreCompare(resp *ihttp.Response) error {
|
|||||||
// 如果为白名单状态码则直接返回
|
// 如果为白名单状态码则直接返回
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if pool.random.Status != 200 && pool.random.Status == status {
|
//if pool.random.Status != 200 && pool.random.Status == status {
|
||||||
return pkg.ErrSameStatus
|
// return pkg.ErrSameStatus
|
||||||
}
|
//}
|
||||||
|
|
||||||
if iutils.IntsContains(pkg.BlackStatus, status) {
|
if iutils.IntsContains(pkg.BlackStatus, status) {
|
||||||
return pkg.ErrBadStatus
|
return pkg.ErrBadStatus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user