mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
fix brute mod not work
This commit is contained in:
parent
32f558f9c5
commit
937855c075
@ -326,30 +326,30 @@ func (opt *Option) NewRunner() (*Runner, error) {
|
|||||||
r.Active = true
|
r.Active = true
|
||||||
pkg.EnableAllFingerEngine = true
|
pkg.EnableAllFingerEngine = true
|
||||||
pkg.Extractors["recon"] = pkg.ExtractRegexps["pentest"]
|
pkg.Extractors["recon"] = pkg.ExtractRegexps["pentest"]
|
||||||
r.IsCheck = false
|
r.bruteMod = true
|
||||||
opt.AppendRule = append(opt.AppendRule, "filebak")
|
opt.AppendRule = append(opt.AppendRule, "filebak")
|
||||||
}
|
}
|
||||||
|
|
||||||
if opt.FileBak {
|
if opt.FileBak {
|
||||||
r.IsCheck = false
|
r.bruteMod = true
|
||||||
opt.AppendRule = append(opt.AppendRule, "filebak")
|
opt.AppendRule = append(opt.AppendRule, "filebak")
|
||||||
}
|
}
|
||||||
if opt.Common {
|
if opt.Common {
|
||||||
r.IsCheck = false
|
r.bruteMod = true
|
||||||
r.AppendWords = append(r.AppendWords, mask.SpecialWords["common_file"]...)
|
r.AppendWords = append(r.AppendWords, mask.SpecialWords["common_file"]...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if opt.Active {
|
if opt.Active {
|
||||||
r.IsCheck = false
|
r.bruteMod = true
|
||||||
r.AppendWords = append(r.AppendWords, pkg.ActivePath...)
|
r.AppendWords = append(r.AppendWords, pkg.ActivePath...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if opt.Crawl {
|
if opt.Crawl {
|
||||||
r.IsCheck = false
|
r.bruteMod = true
|
||||||
}
|
}
|
||||||
|
|
||||||
opt.PrintPlugin()
|
opt.PrintPlugin()
|
||||||
if r.IsCheck == true {
|
if r.bruteMod {
|
||||||
logs.Log.Important("enabling brute mod, because of enabled brute plugin")
|
logs.Log.Important("enabling brute mod, because of enabled brute plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ type Runner struct {
|
|||||||
outputCh chan *pkg.Baseline
|
outputCh chan *pkg.Baseline
|
||||||
fuzzyCh chan *pkg.Baseline
|
fuzzyCh chan *pkg.Baseline
|
||||||
bar *mpb.Bar
|
bar *mpb.Bar
|
||||||
|
bruteMod bool
|
||||||
IsCheck bool
|
IsCheck bool
|
||||||
Pools *ants.PoolWithFunc
|
Pools *ants.PoolWithFunc
|
||||||
PoolName map[string]bool
|
PoolName map[string]bool
|
||||||
@ -111,6 +112,9 @@ func (r *Runner) AppendFunction(fn func(string) []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *Runner) Prepare(ctx context.Context) error {
|
func (r *Runner) Prepare(ctx context.Context) error {
|
||||||
|
if r.bruteMod {
|
||||||
|
r.IsCheck = false
|
||||||
|
}
|
||||||
r.OutputHandler()
|
r.OutputHandler()
|
||||||
var err error
|
var err error
|
||||||
if r.IsCheck {
|
if r.IsCheck {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user