diff --git a/go.mod b/go.mod index 27e1344..5748f7a 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/chainreactors/ipcs v0.0.13 github.com/chainreactors/logs v0.6.2 github.com/chainreactors/parsers v0.2.7 - github.com/chainreactors/words v0.3.1 + github.com/chainreactors/words v0.3.2-0.20221210163218-dc834b0519bc ) require ( diff --git a/go.sum b/go.sum index fa24950..6c513c7 100644 --- a/go.sum +++ b/go.sum @@ -23,6 +23,8 @@ github.com/chainreactors/parsers v0.2.7 h1:3iEuluL7gSDrElZWyf1KEiTgddgcoZC0IaIHb github.com/chainreactors/parsers v0.2.7/go.mod h1:Z9weht+lnFCk7UcwqFu6lXpS7u5vttiy0AJYOAyCCLA= github.com/chainreactors/words v0.3.1 h1:Onx+FKOp0cZHCNQj2hB2tHOclbWCvQ8aOcreX8e5SSQ= github.com/chainreactors/words v0.3.1/go.mod h1:jRcFgafTKqdkd1+StzPCTJG1ESrZHluXEO2eERdHBMQ= +github.com/chainreactors/words v0.3.2-0.20221210163218-dc834b0519bc h1:VBKKX6Uc6pJA9ST48m1p6H8V2mm1UIypIboFBaGNbMY= +github.com/chainreactors/words v0.3.2-0.20221210163218-dc834b0519bc/go.mod h1:jRcFgafTKqdkd1+StzPCTJG1ESrZHluXEO2eERdHBMQ= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/internal/option.go b/internal/option.go index 349d60b..3ec5191 100644 --- a/internal/option.go +++ b/internal/option.go @@ -69,7 +69,7 @@ type ModeOptions struct { CheckOnly bool `long:"check-only" description:"Bool, check only"` Recursive string `long:"recursive" default:"current.IsDir()" description:"String,custom recursive rule, e.g.: --recursive current.IsDir()"` Depth int `long:"depth" default:"0" description:"Int, recursive depth"` - CheckPeriod int `long:"check-period" default:"100" description:"Int, check period when request"` + CheckPeriod int `long:"check-period" default:"200" description:"Int, check period when request"` ErrPeriod int `long:"error-period" default:"10" description:"Int, check period when error"` BreakThreshold int `long:"error-threshold" default:"20" description:"Int, break when the error exceeds the threshold "` BlackStatus string `long:"black-status" default:"404,400,410" description:"Strings (comma split),custom black status, "` diff --git a/internal/pool.go b/internal/pool.go index 1ba7799..943a724 100644 --- a/internal/pool.go +++ b/internal/pool.go @@ -132,7 +132,7 @@ func NewPool(ctx context.Context, config *pkg.Config) (*Pool, error) { pool.initwg.Done() case CheckSource: if bl.ErrString != "" { - logs.Log.Warnf("[check.error] maybe ip had banned by waf, break (%d/%d), error: %s", pool.failedCount, pool.BreakThreshold, bl.ErrString) + logs.Log.Warnf("[check.error] %s maybe ip had banned, break (%d/%d), error: %s", pool.BaseURL, pool.failedCount, pool.BreakThreshold, bl.ErrString) pool.failedBaselines = append(pool.failedBaselines, bl) } else if i := pool.random.Compare(bl); i < 1 { if i == 0 { diff --git a/pkg/baseline.go b/pkg/baseline.go index 24e9e09..b355ac1 100644 --- a/pkg/baseline.go +++ b/pkg/baseline.go @@ -2,6 +2,7 @@ package pkg import ( "encoding/json" + "github.com/chainreactors/gogo/v2/pkg/utils" "github.com/chainreactors/parsers" "github.com/chainreactors/spray/pkg/ihttp" "net/url" @@ -95,7 +96,7 @@ func (bl *Baseline) IsDir() bool { // Collect 深度收集信息 func (bl *Baseline) Collect() { if len(bl.Body) > 0 { - bl.Title = parsers.MatchTitle(string(bl.Body)) + bl.Title = utils.AsciiEncode(parsers.MatchTitle(string(bl.Body))) } bl.Hashes = parsers.NewHashes(bl.Body) // todo extract