nuclei/v2/pkg/templates/templates.go

32 lines
1.2 KiB
Go
Raw Normal View History

package templates
import (
2020-12-29 11:03:25 +00:00
"github.com/projectdiscovery/nuclei/v2/pkg/protocols"
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/dns"
2021-01-01 09:58:28 +00:00
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/file"
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/http"
"github.com/projectdiscovery/nuclei/v2/pkg/workflows"
)
// 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 map[string]string `yaml:"info"`
// RequestsHTTP contains the http request to make in the template
RequestsHTTP []*http.Request `yaml:"requests,omitempty"`
2020-07-18 19:42:23 +00:00
// RequestsDNS contains the dns request to make in the template
RequestsDNS []*dns.Request `yaml:"dns,omitempty"`
2021-01-01 09:58:28 +00:00
// RequestsFile contains the file request to make in the template
RequestsFile []*file.Request `yaml:"file,omitempty"`
// Workflows is a yaml based workflow declaration code.
2020-12-30 07:56:55 +00:00
workflows.Workflow `yaml:",inline"`
CompiledWorkflow *workflows.Workflow
// TotalRequests is the total number of requests for the template.
TotalRequests int
// Executer is the actual template executor for running template requests
Executer protocols.Executer
2020-07-31 15:13:51 +00:00
}