nuclei

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Name        string   `yaml:"name"`
	Author      string   `yaml:"author"`
	Severity    string   `yaml:"severity"`
	Description string   `yaml:"description"`
	Tags        string   `yaml:"tags"`
	Reference   []string `yaml:"reference"`
}

type Matcher

type Matcher struct {
	Type      string   `yaml:"type"`
	Words     []string `yaml:"words"`
	Regex     []string `yaml:"regex"`
	Status    []int    `yaml:"status"`
	Part      string   `yaml:"part"`
	Condition string   `yaml:"condition"`
	Negative  bool     `yaml:"negative"`
}

type Request

type Request struct {
	Method            string            `yaml:"method"`
	Path              []string          `yaml:"path"`
	Headers           map[string]string `yaml:"headers"`
	Body              string            `yaml:"body"`
	Matchers          []Matcher         `yaml:"matchers"`
	MatchersCondition string            `yaml:"matchers-condition"`
	Redirects         bool              `yaml:"redirects"`
	MaxRedirects      int               `yaml:"max-redirects"`
}

type Result

type Result struct {
	TemplateID string
	Name       string
	Severity   string
	Matched    bool
	URL        string
	MatchedAt  string
	Evidence   string
}

Result of a template execution

func Execute

func Execute(t *Template, baseURL string, timeout int, proxy string) *Result

Execute runs a template against a target URL

type Template

type Template struct {
	ID       string    `yaml:"id"`
	Info     Info      `yaml:"info"`
	Requests []Request `yaml:"http"`
}

Template represents a nuclei template (subset of fields we support)

func LoadTemplate

func LoadTemplate(path string) (*Template, error)

LoadTemplate parses a single nuclei template file

func LoadTemplates

func LoadTemplates(dir string, tags string, severity string) ([]*Template, error)

LoadTemplates loads all templates from a directory (recursive)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL