mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 22:55:27 +00:00
25 lines
622 B
Go
25 lines
622 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
nuclei "github.com/projectdiscovery/nuclei/v3/lib"
|
|
)
|
|
|
|
func main() {
|
|
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
|
|
)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
// load targets and optionally probe non http/https targets
|
|
ne.LoadTargets([]string{"http://honey.scanme.sh"}, false)
|
|
err = ne.ExecuteWithCallback(nil)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
defer ne.Close()
|
|
}
|