mirror of
https://github.com/chainreactors/spray.git
synced 2025-06-21 18:30:49 +00:00
feat: recover fuzzuli generate algorithm
This commit is contained in:
parent
10540f942c
commit
fd7b603e02
@ -114,6 +114,7 @@ type PluginOptions struct {
|
||||
ActivePlugin bool `long:"active" description:"Bool, enable active finger path"`
|
||||
ReconPlugin bool `long:"recon" description:"Bool, enable recon" config:"recon"`
|
||||
BakPlugin bool `long:"bak" description:"Bool, enable bak found" config:"bak"`
|
||||
FuzzuliPlugin bool `long:"fuzzuli" description:"Bool, enable fuzzuli plugin" config:"fuzzuli"`
|
||||
CommonPlugin bool `long:"common" description:"Bool, enable common file found" config:"common"`
|
||||
CrawlPlugin bool `long:"crawl" description:"Bool, enable crawl" config:"crawl"`
|
||||
CrawlDepth int `long:"crawl-depth" default:"3" description:"Int, crawl depth" config:"crawl-depth"`
|
||||
@ -531,6 +532,9 @@ func (opt *Option) PrintConfig(r *Runner) string {
|
||||
if opt.BakPlugin {
|
||||
pluginValues = append(pluginValues, "bak")
|
||||
}
|
||||
if opt.FuzzuliPlugin {
|
||||
pluginValues = append(pluginValues, "fuzzuli")
|
||||
}
|
||||
if opt.CommonPlugin {
|
||||
pluginValues = append(pluginValues, "common")
|
||||
}
|
||||
@ -588,6 +592,7 @@ func (opt *Option) BuildPlugin(r *Runner) error {
|
||||
opt.CrawlPlugin = true
|
||||
opt.Finger = true
|
||||
opt.BakPlugin = true
|
||||
opt.FuzzuliPlugin = true
|
||||
opt.CommonPlugin = true
|
||||
opt.ActivePlugin = true
|
||||
opt.ReconPlugin = true
|
||||
|
@ -176,6 +176,11 @@ func (pool *BrutePool) Run(offset, limit int) {
|
||||
go pool.doBak()
|
||||
}
|
||||
|
||||
if pool.Fuzzuli {
|
||||
pool.wg.Add(1)
|
||||
go pool.doFuzzuli()
|
||||
}
|
||||
|
||||
if pool.Common {
|
||||
pool.wg.Add(1)
|
||||
go pool.doCommonFile()
|
||||
@ -793,17 +798,24 @@ func (pool *BrutePool) doScopeCrawl(bl *baseline.Baseline) {
|
||||
}()
|
||||
}
|
||||
|
||||
func (pool *BrutePool) doFuzzuli() {
|
||||
defer pool.wg.Done()
|
||||
if pool.Mod == HostSpray {
|
||||
return
|
||||
}
|
||||
for w := range NewBruteDSL(pool.Config, "{?0}.{?@bak_ext}", [][]string{pkg.BakGenerator(pool.url.Host)}).Output {
|
||||
pool.addAddition(&Unit{
|
||||
path: pool.dir + w,
|
||||
source: parsers.BakSource,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (pool *BrutePool) doBak() {
|
||||
defer pool.wg.Done()
|
||||
if pool.Mod == HostSpray {
|
||||
return
|
||||
}
|
||||
//for w := range NewBruteDSL(pool.Config, "{?0}.{?@bak_ext}", [][]string{pkg.BakGenerator(pool.url.Host)}).Output {
|
||||
// pool.addAddition(&Unit{
|
||||
// path: pool.dir + w,
|
||||
// source: parsers.BakSource,
|
||||
// })
|
||||
//}
|
||||
|
||||
for w := range NewBruteDSL(pool.Config, "{?@bak_name}.{?@bak_ext}", nil).Output {
|
||||
pool.addAddition(&Unit{
|
||||
|
@ -42,6 +42,7 @@ type Config struct {
|
||||
Scope []string
|
||||
Active bool
|
||||
Bak bool
|
||||
Fuzzuli bool
|
||||
Common bool
|
||||
RetryLimit int
|
||||
RandomUserAgent bool
|
||||
|
@ -89,6 +89,7 @@ func (r *Runner) PrepareConfig() *pool.Config {
|
||||
Scope: r.Scope,
|
||||
Active: r.Finger,
|
||||
Bak: r.BakPlugin,
|
||||
Fuzzuli: r.FuzzuliPlugin,
|
||||
Common: r.CommonPlugin,
|
||||
RetryLimit: r.RetryCount,
|
||||
ClientType: r.ClientType,
|
||||
|
Loading…
x
Reference in New Issue
Block a user