mirror of
https://github.com/chainreactors/spray.git
synced 2025-06-21 02:10:39 +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"`
|
ActivePlugin bool `long:"active" description:"Bool, enable active finger path"`
|
||||||
ReconPlugin bool `long:"recon" description:"Bool, enable recon" config:"recon"`
|
ReconPlugin bool `long:"recon" description:"Bool, enable recon" config:"recon"`
|
||||||
BakPlugin bool `long:"bak" description:"Bool, enable bak found" config:"bak"`
|
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"`
|
CommonPlugin bool `long:"common" description:"Bool, enable common file found" config:"common"`
|
||||||
CrawlPlugin bool `long:"crawl" description:"Bool, enable crawl" config:"crawl"`
|
CrawlPlugin bool `long:"crawl" description:"Bool, enable crawl" config:"crawl"`
|
||||||
CrawlDepth int `long:"crawl-depth" default:"3" description:"Int, crawl depth" config:"crawl-depth"`
|
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 {
|
if opt.BakPlugin {
|
||||||
pluginValues = append(pluginValues, "bak")
|
pluginValues = append(pluginValues, "bak")
|
||||||
}
|
}
|
||||||
|
if opt.FuzzuliPlugin {
|
||||||
|
pluginValues = append(pluginValues, "fuzzuli")
|
||||||
|
}
|
||||||
if opt.CommonPlugin {
|
if opt.CommonPlugin {
|
||||||
pluginValues = append(pluginValues, "common")
|
pluginValues = append(pluginValues, "common")
|
||||||
}
|
}
|
||||||
@ -588,6 +592,7 @@ func (opt *Option) BuildPlugin(r *Runner) error {
|
|||||||
opt.CrawlPlugin = true
|
opt.CrawlPlugin = true
|
||||||
opt.Finger = true
|
opt.Finger = true
|
||||||
opt.BakPlugin = true
|
opt.BakPlugin = true
|
||||||
|
opt.FuzzuliPlugin = true
|
||||||
opt.CommonPlugin = true
|
opt.CommonPlugin = true
|
||||||
opt.ActivePlugin = true
|
opt.ActivePlugin = true
|
||||||
opt.ReconPlugin = true
|
opt.ReconPlugin = true
|
||||||
|
@ -176,6 +176,11 @@ func (pool *BrutePool) Run(offset, limit int) {
|
|||||||
go pool.doBak()
|
go pool.doBak()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pool.Fuzzuli {
|
||||||
|
pool.wg.Add(1)
|
||||||
|
go pool.doFuzzuli()
|
||||||
|
}
|
||||||
|
|
||||||
if pool.Common {
|
if pool.Common {
|
||||||
pool.wg.Add(1)
|
pool.wg.Add(1)
|
||||||
go pool.doCommonFile()
|
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() {
|
func (pool *BrutePool) doBak() {
|
||||||
defer pool.wg.Done()
|
defer pool.wg.Done()
|
||||||
if pool.Mod == HostSpray {
|
if pool.Mod == HostSpray {
|
||||||
return
|
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 {
|
for w := range NewBruteDSL(pool.Config, "{?@bak_name}.{?@bak_ext}", nil).Output {
|
||||||
pool.addAddition(&Unit{
|
pool.addAddition(&Unit{
|
||||||
|
@ -42,6 +42,7 @@ type Config struct {
|
|||||||
Scope []string
|
Scope []string
|
||||||
Active bool
|
Active bool
|
||||||
Bak bool
|
Bak bool
|
||||||
|
Fuzzuli bool
|
||||||
Common bool
|
Common bool
|
||||||
RetryLimit int
|
RetryLimit int
|
||||||
RandomUserAgent bool
|
RandomUserAgent bool
|
||||||
|
@ -89,6 +89,7 @@ func (r *Runner) PrepareConfig() *pool.Config {
|
|||||||
Scope: r.Scope,
|
Scope: r.Scope,
|
||||||
Active: r.Finger,
|
Active: r.Finger,
|
||||||
Bak: r.BakPlugin,
|
Bak: r.BakPlugin,
|
||||||
|
Fuzzuli: r.FuzzuliPlugin,
|
||||||
Common: r.CommonPlugin,
|
Common: r.CommonPlugin,
|
||||||
RetryLimit: r.RetryCount,
|
RetryLimit: r.RetryCount,
|
||||||
ClientType: r.ClientType,
|
ClientType: r.ClientType,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user