Documentation ¶
Index ¶
- Constants
- func ContextConfigBus(ctx context.Context) (*config.Config, *eventbus.EventBus, error)
- func SanitizeDNSRequest(req *DNSRequest)
- func TrustedTag(tag string) bool
- type ASNCache
- type ASNRequest
- type AddrRequest
- type AddressInfo
- type ContextKey
- type DNSAnswer
- type DNSRequest
- type Output
- type ResolvedRequest
- type SubdomainRequest
- type WhoisRequest
- type ZoneXFRRequest
Constants ¶
const ( NONE = "none" ALT = "alt" GUESS = "guess" ARCHIVE = "archive" API = "api" AXFR = "axfr" BRUTE = "brute" CERT = "cert" CRAWL = "crawl" DNS = "dns" RIR = "rir" EXTERNAL = "ext" SCRAPE = "scrape" )
Request tag types.
const ( NewNameTopic = "amass:newname" NewAddrTopic = "amass:newaddr" SubDiscoveredTopic = "amass:newsub" ASNRequestTopic = "amass:asnreq" NewASNTopic = "amass:newasn" WhoisRequestTopic = "amass:whoisreq" NewWhoisTopic = "amass:whoisinfo" LogTopic = "amass:log" OutputTopic = "amass:output" )
Request Pub/Sub topics used across Amass.
Variables ¶
This section is empty.
Functions ¶
func ContextConfigBus ¶ added in v3.11.10
ContextConfigBus extracts the Config and EventBus references from the Context argument.
func SanitizeDNSRequest ¶ added in v3.5.2
func SanitizeDNSRequest(req *DNSRequest)
SanitizeDNSRequest cleans the Name and Domain elements of the receiver.
func TrustedTag ¶
TrustedTag returns true when the tag parameter is of a type that should be trusted even facing DNS wildcards.
Types ¶
type ASNCache ¶ added in v3.11.10
ASNCache builds a cache of ASN and netblock information.
func NewASNCache ¶ added in v3.11.10
func NewASNCache() *ASNCache
NewASNCache returns an empty ASNCache for saving and search ASN and netblock information.
func (*ASNCache) ASNSearch ¶ added in v3.11.10
func (c *ASNCache) ASNSearch(asn int) *ASNRequest
ASNSearch returns the cached ASN / netblock info associated with the provided asn parameter, or nil when not found in the cache.
func (*ASNCache) AddrSearch ¶ added in v3.11.10
func (c *ASNCache) AddrSearch(addr string) *ASNRequest
AddrSearch returns the cached ASN / netblock info that the addr parameter belongs in, or nil when not found in the cache.
func (*ASNCache) DescriptionSearch ¶ added in v3.14.3
func (c *ASNCache) DescriptionSearch(s string) []*ASNRequest
DescriptionSearch matches the provided string against description fields in the cache and returns the ASN / netblock info for matching entries.
func (*ASNCache) Update ¶ added in v3.11.10
func (c *ASNCache) Update(req *ASNRequest)
Update uses the saves the information in ASNRequest into the ASNCache.
type ASNRequest ¶
type ASNRequest struct { Address string ASN int Prefix string CC string Registry string AllocationDate time.Time Description string Netblocks []string Tag string Source string }
ASNRequest handles all autonomous system information needed by Amass.
func (*ASNRequest) Clone ¶ added in v3.11.0
func (a *ASNRequest) Clone() pipeline.Data
Clone implements pipeline Data.
func (*ASNRequest) MarkAsProcessed ¶ added in v3.11.0
func (a *ASNRequest) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.
func (*ASNRequest) Valid ¶ added in v3.11.0
func (a *ASNRequest) Valid() bool
Valid performs input validation of the receiver.
type AddrRequest ¶
AddrRequest handles data needed throughout Service processing of a network address.
func (*AddrRequest) Clone ¶ added in v3.11.0
func (a *AddrRequest) Clone() pipeline.Data
Clone implements pipeline Data.
func (*AddrRequest) MarkAsProcessed ¶ added in v3.11.0
func (a *AddrRequest) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.
func (*AddrRequest) Valid ¶ added in v3.11.0
func (a *AddrRequest) Valid() bool
Valid performs input validation of the receiver.
type AddressInfo ¶
type AddressInfo struct { Address net.IP `json:"ip"` Netblock *net.IPNet `json:"-"` CIDRStr string `json:"cidr"` ASN int `json:"asn"` Description string `json:"desc"` }
AddressInfo stores all network addressing info for the Output type.
type ContextKey ¶
type ContextKey int
ContextKey is the type used for context value keys.
const ( ContextConfig ContextKey = iota ContextEventBus )
The key used when values are obtained during service requests.
type DNSAnswer ¶
type DNSAnswer struct { Name string `json:"name"` Type int `json:"type"` TTL int `json:"TTL"` Data string `json:"data"` }
DNSAnswer is the type used by Amass to represent a DNS record.
type DNSRequest ¶
DNSRequest handles data needed throughout Service processing of a DNS name.
func (*DNSRequest) Clone ¶ added in v3.11.0
func (d *DNSRequest) Clone() pipeline.Data
Clone implements pipeline Data.
func (*DNSRequest) MarkAsProcessed ¶ added in v3.11.0
func (d *DNSRequest) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.
func (*DNSRequest) Valid ¶ added in v3.11.0
func (d *DNSRequest) Valid() bool
Valid performs input validation of the receiver.
type Output ¶
type Output struct { Name string `json:"name"` Domain string `json:"domain"` Addresses []AddressInfo `json:"addresses"` Tag string `json:"tag"` Sources []string `json:"sources"` }
Output contains all the output data for an enumerated DNS name.
func (*Output) Complete ¶ added in v3.14.0
Complete checks that all the required fields have been populated.
func (*Output) MarkAsProcessed ¶ added in v3.11.0
func (o *Output) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.
type ResolvedRequest ¶ added in v3.11.0
type ResolvedRequest struct { Name string Domain string Records []DNSAnswer Tag string Source string }
func (*ResolvedRequest) Clone ¶ added in v3.11.0
func (r *ResolvedRequest) Clone() pipeline.Data
Clone implements pipeline Data.
func (*ResolvedRequest) MarkAsProcessed ¶ added in v3.11.0
func (r *ResolvedRequest) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.
func (*ResolvedRequest) Valid ¶ added in v3.11.0
func (r *ResolvedRequest) Valid() bool
Valid performs input validation of the receiver.
type SubdomainRequest ¶ added in v3.11.0
type SubdomainRequest struct { Name string Domain string Records []DNSAnswer Tag string Source string Times int }
SubdomainRequest handles subdomain data processed by enumeration.
func (*SubdomainRequest) Clone ¶ added in v3.11.0
func (s *SubdomainRequest) Clone() pipeline.Data
Clone implements pipeline Data.
func (*SubdomainRequest) MarkAsProcessed ¶ added in v3.11.0
func (s *SubdomainRequest) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.
func (*SubdomainRequest) Valid ¶ added in v3.11.0
func (s *SubdomainRequest) Valid() bool
Valid performs input validation of the receiver.
type WhoisRequest ¶
type WhoisRequest struct { Domain string Company string Email string NewDomains []string Tag string Source string }
WhoisRequest handles data needed throughout Service processing of reverse whois.
type ZoneXFRRequest ¶ added in v3.11.0
ZoneXFRRequest handles zone transfer requests.
func (*ZoneXFRRequest) Clone ¶ added in v3.11.0
func (z *ZoneXFRRequest) Clone() pipeline.Data
Clone implements pipeline Data.
func (*ZoneXFRRequest) MarkAsProcessed ¶ added in v3.11.0
func (z *ZoneXFRRequest) MarkAsProcessed()
MarkAsProcessed implements pipeline Data.