diff --git a/DESIGN.md b/DESIGN.md index 1329ffdc0..3f87f60a7 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -312,7 +312,7 @@ func main() { protocolstate.Init(defaultOpts) protocolinit.Init(defaultOpts) - defaultOpts.Templates = goflags.StringSlice{"dns/cname-service-detection.yaml"} + defaultOpts.Templates = goflags.FileOriginalNormalizedStringSlice{"dns/cname-service-detection.yaml"} defaultOpts.ExcludeTags = config.ReadIgnoreFile().Tags interactOpts := interactsh.NewDefaultOptions(outputWriter, reportingClient, mockProgress) @@ -334,6 +334,7 @@ func main() { Interactsh: interactClient, HostErrorsCache: cache, Colorizer: aurora.NewAurora(true), + ResumeCfg: types.NewResumeCfg(), } engine := core.New(defaultOpts) engine.SetExecuterOptions(executerOpts) @@ -352,6 +353,7 @@ func main() { input := &inputs.SimpleInputProvider{Inputs: []string{"docs.hackerone.com"}} _ = engine.Execute(store.Templates(), input) + engine.WorkPool().Wait() // Wait for the scan to finish } ``` diff --git a/integration_tests/code/test.yaml b/integration_tests/code/test.yaml new file mode 100644 index 000000000..d61653196 --- /dev/null +++ b/integration_tests/code/test.yaml @@ -0,0 +1,17 @@ +id: go-integration-test + +info: + name: Basic Go Integration Test + author: pdteam + severity: info + +requests: + - method: GET + path: + - "{{BaseURL}}" + headers: + test: nuclei + matchers: + - type: word + words: + - "This is test headers matcher text" \ No newline at end of file diff --git a/v2/cmd/integration-test/integration-test.go b/v2/cmd/integration-test/integration-test.go index a6635674e..2ae4f93ab 100644 --- a/v2/cmd/integration-test/integration-test.go +++ b/v2/cmd/integration-test/integration-test.go @@ -28,6 +28,7 @@ var ( "headless": headlessTestcases, "whois": whoisTestCases, "ssl": sslTestcases, + "code": codeTestcases, "templatesPath": templatesPathTestCases, "templatesDir": templatesDirTestCases, }