mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 19:50:18 +00:00
添加-a参数, 自动开启--crawl与--active
This commit is contained in:
parent
77d4e25c9e
commit
3d9e994c78
@ -74,6 +74,7 @@ type RequestOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ModeOptions struct {
|
type ModeOptions struct {
|
||||||
|
Advance bool `short:"a" long:"advance" description:"Bool, enable crawl and active"`
|
||||||
Force bool `long:"force" description:"Bool, skip error break"`
|
Force bool `long:"force" description:"Bool, skip error break"`
|
||||||
CheckOnly bool `long:"check-only" description:"Bool, check only"`
|
CheckOnly bool `long:"check-only" description:"Bool, check only"`
|
||||||
Recursive string `long:"recursive" default:"current.IsDir()" description:"String,custom recursive rule, e.g.: --recursive current.IsDir()"`
|
Recursive string `long:"recursive" default:"current.IsDir()" description:"String,custom recursive rule, e.g.: --recursive current.IsDir()"`
|
||||||
@ -130,7 +131,10 @@ func (opt *Option) PrepareRunner() (*Runner, error) {
|
|||||||
Crawl: opt.Crawl,
|
Crawl: opt.Crawl,
|
||||||
Active: opt.Active,
|
Active: opt.Active,
|
||||||
}
|
}
|
||||||
|
if opt.Advance {
|
||||||
|
r.Crawl = true
|
||||||
|
r.Active = true
|
||||||
|
}
|
||||||
err = pkg.LoadTemplates()
|
err = pkg.LoadTemplates()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user