diff --git a/internal/pool/brutepool.go b/internal/pool/brutepool.go index d7d6d84..110cc17 100644 --- a/internal/pool/brutepool.go +++ b/internal/pool/brutepool.go @@ -407,8 +407,10 @@ func (pool *BrutePool) Invoke(v interface{}) { // 异步进行性能消耗较大的深度对比 pool.processCh <- bl if int(pool.Statistor.ReqTotal)%pool.CheckPeriod == 0 { + // 间歇插入check waf的探针 pool.doCheck() } else if pool.failedCount%pool.ErrPeriod == 0 { + // 发生错误时插入探针, 如果超过阈值提前退出 atomic.AddInt32(&pool.failedCount, 1) pool.doCheck() } @@ -553,9 +555,9 @@ func (pool *BrutePool) PreCompare(resp *ihttp.Response) error { // 如果为白名单状态码则直接返回 return nil } - if pool.random.Status != 200 && pool.random.Status == status { - return pkg.ErrSameStatus - } + //if pool.random.Status != 200 && pool.random.Status == status { + // return pkg.ErrSameStatus + //} if iutils.IntsContains(pkg.BlackStatus, status) { return pkg.ErrBadStatus