展示删掉根据waf指纹判断waf, 因为可能会有大量误报

This commit is contained in:
M09Ic 2022-12-12 18:01:14 +08:00
parent 15e2cbbca8
commit c9f7620aed
3 changed files with 14 additions and 8 deletions

View File

@ -391,13 +391,16 @@ func (pool *Pool) BaseCompare(bl *pkg.Baseline) bool {
} }
bl.Collect() bl.Collect()
for _, f := range bl.Frameworks { //if !pool.IgnoreWaf {
if f.HasTag("waf") || f.HasTag("cdn") { // // 部分情况下waf的特征可能是全局, 指定了--ignore-waf则不会进行waf的指纹检测
pool.Statistor.WafedNumber++ // for _, f := range bl.Frameworks {
bl.Reason = ErrWaf.Error() // if f.HasTag("waf") {
return false // pool.Statistor.WafedNumber++
} // bl.Reason = ErrWaf.Error()
} // return false
// }
// }
//}
if ok && status == 0 && base.FuzzyCompare(bl) { if ok && status == 0 && base.FuzzyCompare(bl) {
pool.Statistor.FuzzyNumber++ pool.Statistor.FuzzyNumber++

View File

@ -60,7 +60,6 @@ type Runner struct {
FuzzyFile *files.File FuzzyFile *files.File
DumpFile *files.File DumpFile *files.File
StatFile *files.File StatFile *files.File
Force bool
Progress *uiprogress.Progress Progress *uiprogress.Progress
Offset int Offset int
Limit int Limit int
@ -70,6 +69,8 @@ type Runner struct {
ErrPeriod int ErrPeriod int
BreakThreshold int BreakThreshold int
CheckOnly bool CheckOnly bool
Force bool
IgnoreWaf bool
} }
func (r *Runner) PrepareConfig() *pkg.Config { func (r *Runner) PrepareConfig() *pkg.Config {
@ -87,6 +88,7 @@ func (r *Runner) PrepareConfig() *pkg.Config {
MatchExpr: r.MatchExpr, MatchExpr: r.MatchExpr,
FilterExpr: r.FilterExpr, FilterExpr: r.FilterExpr,
RecuExpr: r.RecursiveExpr, RecuExpr: r.RecursiveExpr,
IgnoreWaf: r.IgnoreWaf,
} }
if config.Mod == pkg.PathSpray { if config.Mod == pkg.PathSpray {
config.ClientType = ihttp.FAST config.ClientType = ihttp.FAST

View File

@ -37,4 +37,5 @@ type Config struct {
OutputCh chan *Baseline OutputCh chan *Baseline
FuzzyCh chan *Baseline FuzzyCh chan *Baseline
Fuzzy bool Fuzzy bool
IgnoreWaf bool
} }