2020-04-04 00:17:57 +05:30
|
|
|
package templates
|
|
|
|
|
|
|
|
|
|
import (
|
2020-07-01 16:17:24 +05:30
|
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/requests"
|
2020-04-04 00:17:57 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Template is a request template parsed from a yaml file
|
|
|
|
|
type Template struct {
|
|
|
|
|
// ID is the unique id for the template
|
|
|
|
|
ID string `yaml:"id"`
|
|
|
|
|
// Info contains information about the template
|
|
|
|
|
Info Info `yaml:"info"`
|
2020-04-26 05:50:33 +05:30
|
|
|
// RequestHTTP contains the http request to make in the template
|
2020-06-29 17:43:08 +05:30
|
|
|
RequestsHTTP []*requests.HTTPRequest `yaml:"requests,omitempty"`
|
2020-04-26 05:50:33 +05:30
|
|
|
// RequestDNS contains the dns request to make in the template
|
2020-06-29 17:43:08 +05:30
|
|
|
RequestsDNS []*requests.DNSRequest `yaml:"dns,omitempty"`
|
2020-04-04 00:17:57 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Info contains information about the request template
|
|
|
|
|
type Info struct {
|
|
|
|
|
// Name is the name of the template
|
|
|
|
|
Name string `yaml:"name"`
|
|
|
|
|
// Author is the name of the author of the template
|
|
|
|
|
Author string `yaml:"author"`
|
|
|
|
|
// Severity optionally describes the severity of the template
|
|
|
|
|
Severity string `yaml:"severity,omitempty"`
|
|
|
|
|
}
|