From 937855c07540a85f50378dd43ca011620cb2bfab Mon Sep 17 00:00:00 2001 From: M09Ic Date: Tue, 20 Aug 2024 16:42:32 +0800 Subject: [PATCH] fix brute mod not work --- internal/option.go | 12 ++++++------ internal/runner.go | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/option.go b/internal/option.go index 5783724..627a461 100644 --- a/internal/option.go +++ b/internal/option.go @@ -326,30 +326,30 @@ func (opt *Option) NewRunner() (*Runner, error) { r.Active = true pkg.EnableAllFingerEngine = true pkg.Extractors["recon"] = pkg.ExtractRegexps["pentest"] - r.IsCheck = false + r.bruteMod = true opt.AppendRule = append(opt.AppendRule, "filebak") } if opt.FileBak { - r.IsCheck = false + r.bruteMod = true opt.AppendRule = append(opt.AppendRule, "filebak") } if opt.Common { - r.IsCheck = false + r.bruteMod = true r.AppendWords = append(r.AppendWords, mask.SpecialWords["common_file"]...) } if opt.Active { - r.IsCheck = false + r.bruteMod = true r.AppendWords = append(r.AppendWords, pkg.ActivePath...) } if opt.Crawl { - r.IsCheck = false + r.bruteMod = true } opt.PrintPlugin() - if r.IsCheck == true { + if r.bruteMod { logs.Log.Important("enabling brute mod, because of enabled brute plugin") } diff --git a/internal/runner.go b/internal/runner.go index a334a40..b70087f 100644 --- a/internal/runner.go +++ b/internal/runner.go @@ -35,6 +35,7 @@ type Runner struct { outputCh chan *pkg.Baseline fuzzyCh chan *pkg.Baseline bar *mpb.Bar + bruteMod bool IsCheck bool Pools *ants.PoolWithFunc PoolName map[string]bool @@ -111,6 +112,9 @@ func (r *Runner) AppendFunction(fn func(string) []string) { } func (r *Runner) Prepare(ctx context.Context) error { + if r.bruteMod { + r.IsCheck = false + } r.OutputHandler() var err error if r.IsCheck {