mirror of https://github.com/daffainfo/nuclei.git
21 lines
581 B
Go
21 lines
581 B
Go
package main
|
|
|
|
import nuclei "github.com/projectdiscovery/nuclei/v3/lib"
|
|
|
|
func main() {
|
|
ne, err := nuclei.NewNucleiEngine(
|
|
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()
|
|
}
|