mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
添加-a参数, 自动开启--crawl与--active
This commit is contained in:
parent
77d4e25c9e
commit
3d9e994c78
@ -74,6 +74,7 @@ type RequestOptions 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"`
|
||||
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()"`
|
||||
@ -130,7 +131,10 @@ func (opt *Option) PrepareRunner() (*Runner, error) {
|
||||
Crawl: opt.Crawl,
|
||||
Active: opt.Active,
|
||||
}
|
||||
|
||||
if opt.Advance {
|
||||
r.Crawl = true
|
||||
r.Active = true
|
||||
}
|
||||
err = pkg.LoadTemplates()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user