mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-21 16:45:30 +00:00
Fix the example code showcasing how to use nuclei as a library
This commit is contained in:
parent
7e209dad01
commit
c1ae0f612a
@ -278,8 +278,8 @@ import (
|
|||||||
"go.uber.org/ratelimit"
|
"go.uber.org/ratelimit"
|
||||||
|
|
||||||
"github.com/projectdiscovery/goflags"
|
"github.com/projectdiscovery/goflags"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/catalog"
|
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/config"
|
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/config"
|
||||||
|
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/disk"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/loader"
|
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/loader"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/core"
|
"github.com/projectdiscovery/nuclei/v2/pkg/core"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/core/inputs"
|
"github.com/projectdiscovery/nuclei/v2/pkg/core/inputs"
|
||||||
@ -312,7 +312,7 @@ func main() {
|
|||||||
protocolstate.Init(defaultOpts)
|
protocolstate.Init(defaultOpts)
|
||||||
protocolinit.Init(defaultOpts)
|
protocolinit.Init(defaultOpts)
|
||||||
|
|
||||||
defaultOpts.Templates = goflags.StringSlice{"dns/cname-service-detection.yaml"}
|
defaultOpts.Templates = goflags.StringSlice{"dns/cname-service.yaml"}
|
||||||
defaultOpts.ExcludeTags = config.ReadIgnoreFile().Tags
|
defaultOpts.ExcludeTags = config.ReadIgnoreFile().Tags
|
||||||
|
|
||||||
interactOpts := interactsh.NewDefaultOptions(outputWriter, reportingClient, mockProgress)
|
interactOpts := interactsh.NewDefaultOptions(outputWriter, reportingClient, mockProgress)
|
||||||
@ -323,7 +323,7 @@ func main() {
|
|||||||
defer interactClient.Close()
|
defer interactClient.Close()
|
||||||
|
|
||||||
home, _ := os.UserHomeDir()
|
home, _ := os.UserHomeDir()
|
||||||
catalog := catalog.New(path.Join(home, "nuclei-templates"))
|
catalog := disk.NewCatalog(path.Join(home, "nuclei-templates"))
|
||||||
executerOpts := protocols.ExecuterOptions{
|
executerOpts := protocols.ExecuterOptions{
|
||||||
Output: outputWriter,
|
Output: outputWriter,
|
||||||
Options: defaultOpts,
|
Options: defaultOpts,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user