mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 08:15:25 +00:00
Moved to an enum for TemplateType in protocols
This commit is contained in:
parent
390ca8b3c6
commit
645ae30a47
@ -32,7 +32,7 @@ type Request struct {
|
|||||||
// - value: "\"{{FQDN}}\""
|
// - value: "\"{{FQDN}}\""
|
||||||
Name string `yaml:"name,omitempty" jsonschema:"title=hostname to make dns request for,description=Name is the Hostname to make DNS request for"`
|
Name string `yaml:"name,omitempty" jsonschema:"title=hostname to make dns request for,description=Name is the Hostname to make DNS request for"`
|
||||||
// description: |
|
// description: |
|
||||||
// Type is the type of DNS request to make.
|
// RequestType is the type of DNS request to make.
|
||||||
// values:
|
// values:
|
||||||
// - "A"
|
// - "A"
|
||||||
// - "NS"
|
// - "NS"
|
||||||
@ -43,7 +43,7 @@ type Request struct {
|
|||||||
// - "MX"
|
// - "MX"
|
||||||
// - "TXT"
|
// - "TXT"
|
||||||
// - "AAAA"
|
// - "AAAA"
|
||||||
Type string `yaml:"type,omitempty" jsonschema:"title=type of dns request to make,description=Type is the type of DNS request to make,enum=A,enum=NS,enum=DS,enum=CNAME,enum=SOA,enum=PTR,enum=MX,enum=TXT,enum=AAAA"`
|
RequestType string `yaml:"type,omitempty" jsonschema:"title=type of dns request to make,description=Type is the type of DNS request to make,enum=A,enum=NS,enum=DS,enum=CNAME,enum=SOA,enum=PTR,enum=MX,enum=TXT,enum=AAAA"`
|
||||||
// description: |
|
// description: |
|
||||||
// Class is the class of the DNS request.
|
// Class is the class of the DNS request.
|
||||||
//
|
//
|
||||||
@ -111,7 +111,7 @@ func (request *Request) Compile(options *protocols.ExecuterOptions) error {
|
|||||||
}
|
}
|
||||||
request.class = classToInt(request.Class)
|
request.class = classToInt(request.Class)
|
||||||
request.options = options
|
request.options = options
|
||||||
request.question = questionTypeToInt(request.Type)
|
request.question = questionTypeToInt(request.RequestType)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,12 +27,12 @@ func TestDNSCompileMake(t *testing.T) {
|
|||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
const templateID = "testing-dns"
|
const templateID = "testing-dns"
|
||||||
request := &Request{
|
request := &Request{
|
||||||
Type: "A",
|
RequestType: "A",
|
||||||
Class: "INET",
|
Class: "INET",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Recursion: false,
|
Recursion: false,
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
}
|
}
|
||||||
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
|
|||||||
@ -23,12 +23,12 @@ func TestResponseToDSLMap(t *testing.T) {
|
|||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
templateID := "testing-dns"
|
templateID := "testing-dns"
|
||||||
request := &Request{
|
request := &Request{
|
||||||
Type: "A",
|
RequestType: "A",
|
||||||
Class: "INET",
|
Class: "INET",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Recursion: false,
|
Recursion: false,
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
}
|
}
|
||||||
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
@ -55,12 +55,12 @@ func TestDNSOperatorMatch(t *testing.T) {
|
|||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
templateID := "testing-dns"
|
templateID := "testing-dns"
|
||||||
request := &Request{
|
request := &Request{
|
||||||
Type: "A",
|
RequestType: "A",
|
||||||
Class: "INET",
|
Class: "INET",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Recursion: false,
|
Recursion: false,
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
}
|
}
|
||||||
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
@ -166,12 +166,12 @@ func TestDNSOperatorExtract(t *testing.T) {
|
|||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
templateID := "testing-dns"
|
templateID := "testing-dns"
|
||||||
request := &Request{
|
request := &Request{
|
||||||
Type: "A",
|
RequestType: "A",
|
||||||
Class: "INET",
|
Class: "INET",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Recursion: false,
|
Recursion: false,
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
}
|
}
|
||||||
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
@ -223,12 +223,12 @@ func TestDNSMakeResult(t *testing.T) {
|
|||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
templateID := "testing-dns"
|
templateID := "testing-dns"
|
||||||
request := &Request{
|
request := &Request{
|
||||||
Type: "A",
|
RequestType: "A",
|
||||||
Class: "INET",
|
Class: "INET",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Recursion: false,
|
Recursion: false,
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
Operators: operators.Operators{
|
Operators: operators.Operators{
|
||||||
Matchers: []*matchers.Matcher{{
|
Matchers: []*matchers.Matcher{{
|
||||||
Name: "test",
|
Name: "test",
|
||||||
|
|||||||
@ -12,10 +12,16 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/expressions"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/expressions"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ protocols.Request = &Request{}
|
var _ protocols.Request = &Request{}
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.DNSProtocol
|
||||||
|
}
|
||||||
|
|
||||||
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
||||||
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
||||||
// Parse the URL and return domain if URL.
|
// Parse the URL and return domain if URL.
|
||||||
|
|||||||
@ -20,12 +20,12 @@ func TestDNSExecuteWithResults(t *testing.T) {
|
|||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
templateID := "testing-dns"
|
templateID := "testing-dns"
|
||||||
request := &Request{
|
request := &Request{
|
||||||
Type: "A",
|
RequestType: "A",
|
||||||
Class: "INET",
|
Class: "INET",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Recursion: false,
|
Recursion: false,
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
Operators: operators.Operators{
|
Operators: operators.Operators{
|
||||||
Matchers: []*matchers.Matcher{{
|
Matchers: []*matchers.Matcher{{
|
||||||
Name: "test",
|
Name: "test",
|
||||||
|
|||||||
@ -15,10 +15,16 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/tostring"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/tostring"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ protocols.Request = &Request{}
|
var _ protocols.Request = &Request{}
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.FileProtocol
|
||||||
|
}
|
||||||
|
|
||||||
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
||||||
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
||||||
wg := sizedwaitgroup.New(request.options.Options.BulkSize)
|
wg := sizedwaitgroup.New(request.options.Options.BulkSize)
|
||||||
|
|||||||
@ -12,10 +12,16 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ protocols.Request = &Request{}
|
var _ protocols.Request = &Request{}
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.HeadlessProtocol
|
||||||
|
}
|
||||||
|
|
||||||
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
||||||
func (request *Request) ExecuteWithResults(inputURL string, metadata, previous output.InternalEvent /*TODO review unused parameter*/, callback protocols.OutputEventCallback) error {
|
func (request *Request) ExecuteWithResults(inputURL string, metadata, previous output.InternalEvent /*TODO review unused parameter*/, callback protocols.OutputEventCallback) error {
|
||||||
instance, err := request.options.Browser.NewInstance()
|
instance, err := request.options.Browser.NewInstance()
|
||||||
|
|||||||
@ -28,12 +28,18 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/interactsh"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/interactsh"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/tostring"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/tostring"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/http/httpclientpool"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/http/httpclientpool"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
"github.com/projectdiscovery/rawhttp"
|
"github.com/projectdiscovery/rawhttp"
|
||||||
"github.com/projectdiscovery/stringsutil"
|
"github.com/projectdiscovery/stringsutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultMaxWorkers = 150
|
const defaultMaxWorkers = 150
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.HTTPProtocol
|
||||||
|
}
|
||||||
|
|
||||||
// executeRaceRequest executes race condition request for a URL
|
// executeRaceRequest executes race condition request for a URL
|
||||||
func (request *Request) executeRaceRequest(reqURL string, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
func (request *Request) executeRaceRequest(reqURL string, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
||||||
var generatedRequests []*generatedRequest
|
var generatedRequests []*generatedRequest
|
||||||
|
|||||||
@ -21,10 +21,16 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/interactsh"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/interactsh"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/replacer"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/replacer"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ protocols.Request = &Request{}
|
var _ protocols.Request = &Request{}
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.NetworkProtocol
|
||||||
|
}
|
||||||
|
|
||||||
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
||||||
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
||||||
var address string
|
var address string
|
||||||
|
|||||||
@ -15,12 +15,18 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/tostring"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/tostring"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ protocols.Request = &Request{}
|
var _ protocols.Request = &Request{}
|
||||||
|
|
||||||
const maxSize = 5 * 1024 * 1024
|
const maxSize = 5 * 1024 * 1024
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.HTTPProtocol
|
||||||
|
}
|
||||||
|
|
||||||
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
// ExecuteWithResults executes the protocol requests and returns results instead of writing them.
|
||||||
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
func (request *Request) ExecuteWithResults(input string, metadata /*TODO review unused parameter*/, previous output.InternalEvent, callback protocols.OutputEventCallback) error {
|
||||||
wg := sizedwaitgroup.New(request.options.Options.BulkSize)
|
wg := sizedwaitgroup.New(request.options.Options.BulkSize)
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/networkclientpool"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/networkclientpool"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -163,12 +164,17 @@ func (request *Request) GetCompiledOperators() []*operators.Operators {
|
|||||||
return []*operators.Operators{request.CompiledOperators}
|
return []*operators.Operators{request.CompiledOperators}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.SSLProtocol
|
||||||
|
}
|
||||||
|
|
||||||
func (request *Request) MakeResultEventItem(wrapped *output.InternalWrappedEvent) *output.ResultEvent {
|
func (request *Request) MakeResultEventItem(wrapped *output.InternalWrappedEvent) *output.ResultEvent {
|
||||||
data := &output.ResultEvent{
|
data := &output.ResultEvent{
|
||||||
TemplateID: types.ToString(request.options.TemplateID),
|
TemplateID: types.ToString(request.options.TemplateID),
|
||||||
TemplatePath: types.ToString(request.options.TemplatePath),
|
TemplatePath: types.ToString(request.options.TemplatePath),
|
||||||
Info: request.options.TemplateInfo,
|
Info: request.options.TemplateInfo,
|
||||||
Type: "ssl",
|
Type: request.Type().String(),
|
||||||
Host: types.ToString(wrapped.InternalEvent["host"]),
|
Host: types.ToString(wrapped.InternalEvent["host"]),
|
||||||
Matched: types.ToString(wrapped.InternalEvent["host"]),
|
Matched: types.ToString(wrapped.InternalEvent["host"]),
|
||||||
Metadata: wrapped.OperatorsResult.PayloadValues,
|
Metadata: wrapped.OperatorsResult.PayloadValues,
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import (
|
|||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/eventcreator"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/responsehighlighter"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/networkclientpool"
|
"github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/networkclientpool"
|
||||||
|
templateTypes "github.com/projectdiscovery/nuclei/v2/pkg/templates/types"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -355,7 +356,7 @@ func (request *Request) MakeResultEventItem(wrapped *output.InternalWrappedEvent
|
|||||||
TemplateID: types.ToString(request.options.TemplateID),
|
TemplateID: types.ToString(request.options.TemplateID),
|
||||||
TemplatePath: types.ToString(request.options.TemplatePath),
|
TemplatePath: types.ToString(request.options.TemplatePath),
|
||||||
Info: request.options.TemplateInfo,
|
Info: request.options.TemplateInfo,
|
||||||
Type: "websocket",
|
Type: request.Type().String(),
|
||||||
Host: types.ToString(wrapped.InternalEvent["host"]),
|
Host: types.ToString(wrapped.InternalEvent["host"]),
|
||||||
Matched: types.ToString(wrapped.InternalEvent["host"]),
|
Matched: types.ToString(wrapped.InternalEvent["host"]),
|
||||||
Metadata: wrapped.OperatorsResult.PayloadValues,
|
Metadata: wrapped.OperatorsResult.PayloadValues,
|
||||||
@ -367,3 +368,8 @@ func (request *Request) MakeResultEventItem(wrapped *output.InternalWrappedEvent
|
|||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type returns the type of the protocol request
|
||||||
|
func (request *Request) Type() templateTypes.ProtocolType {
|
||||||
|
return templateTypes.WebsocketProtocol
|
||||||
|
}
|
||||||
|
|||||||
@ -37,11 +37,11 @@ var (
|
|||||||
_ = exampleNormalHTTPRequest
|
_ = exampleNormalHTTPRequest
|
||||||
|
|
||||||
exampleNormalDNSRequest = &dns.Request{
|
exampleNormalDNSRequest = &dns.Request{
|
||||||
Name: "{{FQDN}}",
|
Name: "{{FQDN}}",
|
||||||
Type: "CNAME",
|
RequestType: "CNAME",
|
||||||
Class: "inet",
|
Class: "inet",
|
||||||
Retries: 2,
|
Retries: 2,
|
||||||
Recursion: true,
|
Recursion: true,
|
||||||
Operators: operators.Operators{
|
Operators: operators.Operators{
|
||||||
Extractors: []*extractors.Extractor{
|
Extractors: []*extractors.Extractor{
|
||||||
{Type: "regex", Regex: []string{"ec2-[-\\d]+\\.compute[-\\d]*\\.amazonaws\\.com", "ec2-[-\\d]+\\.[\\w\\d\\-]+\\.compute[-\\d]*\\.amazonaws\\.com"}},
|
{Type: "regex", Regex: []string{"ec2-[-\\d]+\\.compute[-\\d]*\\.amazonaws\\.com", "ec2-[-\\d]+\\.[\\w\\d\\-]+\\.compute[-\\d]*\\.amazonaws\\.com"}},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user