mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 17:56:56 +00:00
add sdk option to disable update check (#5346)
This commit is contained in:
parent
6cbd73f780
commit
6c32eb7d1e
@ -1,9 +1,13 @@
|
||||
package main
|
||||
|
||||
import nuclei "github.com/projectdiscovery/nuclei/v3/lib"
|
||||
import (
|
||||
"context"
|
||||
|
||||
nuclei "github.com/projectdiscovery/nuclei/v3/lib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ne, err := nuclei.NewNucleiEngine(
|
||||
ne, err := nuclei.NewNucleiEngineCtx(context.Background(),
|
||||
nuclei.WithTemplateFilters(nuclei.TemplateFilters{Tags: []string{"oast"}}),
|
||||
nuclei.EnableStatsWithOpts(nuclei.StatsOptions{MetricServerPort: 6064}), // optionally enable metrics server for better observability
|
||||
)
|
||||
|
||||
@ -440,3 +440,11 @@ func WithCatalog(cat catalog.Catalog) NucleiSDKOptions {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DisableUpdateCheck disables nuclei update check
|
||||
func DisableUpdateCheck() NucleiSDKOptions {
|
||||
return func(e *NucleiEngine) error {
|
||||
DefaultConfig.DisableUpdateCheck()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user