新增--check-only参数, 暂未实装

This commit is contained in:
M09Ic 2022-11-17 05:29:19 +08:00
parent 9439191ed4
commit 11a8b6168c
2 changed files with 16 additions and 13 deletions

1
internal/check.go Normal file
View File

@ -0,0 +1 @@
package internal

View File

@ -52,6 +52,7 @@ type RequestOptions struct {
Cookie string `long:"cookie"` Cookie string `long:"cookie"`
Force bool `long:"force"` Force bool `long:"force"`
SimhashDistance int `long:"distance"` SimhashDistance int `long:"distance"`
CheckOnly bool `long:"--check-only"`
} }
type MiscOptions struct { type MiscOptions struct {
@ -72,19 +73,20 @@ func (opt *Option) PrepareRunner() (*Runner, error) {
} }
var err error var err error
r := &Runner{ r := &Runner{
Progress: uiprogress.New(), Progress: uiprogress.New(),
Threads: opt.Threads, Threads: opt.Threads,
PoolSize: opt.PoolSize, PoolSize: opt.PoolSize,
Mod: opt.Mod, Mod: opt.Mod,
Timeout: opt.Timeout, Timeout: opt.Timeout,
Deadline: opt.Deadline, Deadline: opt.Deadline,
Offset: opt.Offset, Offset: opt.Offset,
Limit: opt.Limit, Limit: opt.Limit,
URLList: make(chan string), URLList: make(chan string),
OutputCh: make(chan *pkg.Baseline, 100), OutputCh: make(chan *pkg.Baseline, 100),
FuzzyCh: make(chan *pkg.Baseline, 100), FuzzyCh: make(chan *pkg.Baseline, 100),
Fuzzy: opt.Fuzzy, Fuzzy: opt.Fuzzy,
Force: opt.Force, Force: opt.Force,
CheckOnly: opt.CheckOnly,
} }
err = pkg.LoadTemplates() err = pkg.LoadTemplates()