mirror of https://github.com/daffainfo/nuclei.git
mics changes
parent
90e7cbdcd2
commit
944d24a252
|
@ -242,9 +242,9 @@ func New(options *types.Options) (*Runner, error) {
|
|||
}
|
||||
|
||||
if options.RateLimitMinute > 0 {
|
||||
runner.ratelimiter = ratelimit.New(context.Background(), int64(options.RateLimitMinute), time.Minute)
|
||||
runner.ratelimiter = ratelimit.New(context.Background(), options.RateLimitMinute, time.Minute)
|
||||
} else if options.RateLimit > 0 {
|
||||
runner.ratelimiter = ratelimit.New(context.Background(), int64(options.RateLimit), time.Second)
|
||||
runner.ratelimiter = ratelimit.New(context.Background(), options.RateLimit, time.Second)
|
||||
} else {
|
||||
runner.ratelimiter = ratelimit.NewUnlimited(context.Background())
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ func NewMockExecuterOptions(options *types.Options, info *TemplateInfo) *protoco
|
|||
IssuesClient: nil,
|
||||
Browser: nil,
|
||||
Catalog: disk.NewCatalog(options.TemplatesDirectory),
|
||||
RateLimiter: ratelimit.New(context.Background(), int64(options.RateLimit), time.Second),
|
||||
RateLimiter: ratelimit.New(context.Background(), options.RateLimit, time.Second),
|
||||
}
|
||||
return executerOpts
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue