Skip to content

Commit

Permalink
fix brute mod not work
Browse files Browse the repository at this point in the history
  • Loading branch information
M09Ic committed Aug 20, 2024
1 parent 32f558f commit 937855c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
4 changes: 4 additions & 0 deletions internal/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 937855c

Please sign in to comment.