Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Check(ip net.IP) (matched bool, value string, itemType string, err error)
- func (c *Client) CheckCDN(ip net.IP) (matched bool, value string, err error)
- func (c *Client) CheckCloud(ip net.IP) (matched bool, value string, err error)
- func (c *Client) CheckDNSResponse(dnsResponse *retryabledns.DNSData) (matched bool, value string, itemType string, err error)
- func (c *Client) CheckDomainWithFallback(domain string) (matched bool, value string, itemType string, err error)
- func (c *Client) CheckSuffix(fqdns ...string) (isCDN bool, provider string, itemType string, err error)
- func (c *Client) CheckWAF(ip net.IP) (matched bool, value string, err error)
- func (c *Client) CheckWappalyzer(data map[string]struct{}) (isCDN bool, provider string, err error)
- func (c *Client) GetDnsData(domain string) (*retryabledns.DNSData, error)
- type InputCompiled
Constants ¶
This section is empty.
Variables ¶
var ( DefaultCDNProviders string DefaultWafProviders string DefaultCloudProviders string )
var DefaultResolvers = []string{
"1.1.1.1:53",
"1.0.0.1:53",
"8.8.8.8:53",
"8.8.4.4:53",
}
DefaultResolvers trusted (taken from fastdialer) - IPv4 only
var IPv6Resolvers = []string{
"[2606:4700:4700::1111]:53",
"[2606:4700:4700::1001]:53",
"[2001:4860:4860::8888]:53",
"[2001:4860:4860::8844]:53",
}
IPv6Resolvers trusted IPv6 resolvers
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client checks for CDN based IPs which should be excluded during scans since they belong to third party firewalls.
func New ¶
func New() *Client
New creates cdncheck client with default options NewWithOpts should be preferred over this function
func NewWithOpts ¶ added in v1.0.2
NewWithOpts creates cdncheck client with custom options
func (*Client) Check ¶
Check checks if ip belongs to one of CDN, WAF and Cloud . It is generic method for Checkxxx methods
func (*Client) CheckCloud ¶ added in v1.0.0
CheckCloud checks if an IP is contained in the cloud denylist
func (*Client) CheckDNSResponse ¶ added in v1.0.2
func (c *Client) CheckDNSResponse(dnsResponse *retryabledns.DNSData) (matched bool, value string, itemType string, err error)
CheckDNSResponse is same as CheckDomainWithFallback but takes DNS response as input
func (*Client) CheckDomainWithFallback ¶ added in v1.0.2
func (c *Client) CheckDomainWithFallback(domain string) (matched bool, value string, itemType string, err error)
Check Domain with fallback checks if domain belongs to one of CDN, WAF and Cloud . It is generic method for Checkxxx methods Since input is domain, as a fallback it queries CNAME records and checks if domain is WAF
func (*Client) CheckSuffix ¶ added in v1.0.0
func (c *Client) CheckSuffix(fqdns ...string) (isCDN bool, provider string, itemType string, err error)
CheckFQDN checks if fqdns are known cloud ones
func (*Client) CheckWappalyzer ¶ added in v1.0.0
CheckWappalyzer checks if the wappalyzer detection are a part of CDN
func (*Client) GetDnsData ¶ added in v1.1.1
func (c *Client) GetDnsData(domain string) (*retryabledns.DNSData, error)
type InputCompiled ¶ added in v1.0.0
type InputCompiled struct { // CDN contains a list of ranges for CDN cidrs CDN map[string][]string `yaml:"cdn,omitempty" json:"cdn,omitempty"` // WAF contains a list of ranges for WAF cidrs WAF map[string][]string `yaml:"waf,omitempty" json:"waf,omitempty"` // Cloud contains a list of ranges for Cloud cidrs Cloud map[string][]string `yaml:"cloud,omitempty" json:"cloud,omitempty"` // Common contains a list of suffixes for major sources Common map[string][]string `yaml:"common,omitempty" json:"common,omitempty"` }
InputCompiled contains a compiled list of input structure
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
cdncheck
command
|
|
functional-test
command
|
|
generate-index
command
|
|
integration-test
command
|
|
internal
|
|