requests

package module
v0.0.0-...-70f4357 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

testAmass

Documentation

Index

Constants

View Source
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.

View Source
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

func ContextConfigBus(ctx context.Context) (*config.Config, *eventbus.EventBus, error)

ContextConfigBus extracts the Config and EventBus references from the Context argument.

func SanitizeDNSRequest

func SanitizeDNSRequest(req *DNSRequest)

SanitizeDNSRequest cleans the Name and Domain elements of the receiver.

func TrustedTag

func TrustedTag(tag string) bool

TrustedTag returns true when the tag parameter is of a type that should be trusted even facing DNS wildcards.

Types

type ASNCache

type ASNCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ASNCache builds a cache of ASN and netblock information.

func NewASNCache

func NewASNCache() *ASNCache

NewASNCache returns an empty ASNCache for saving and search ASN and netblock information.

func (*ASNCache) ASNSearch

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

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

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

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

func (a *ASNRequest) Clone() pipeline.Data

Clone implements pipeline Data.

func (*ASNRequest) MarkAsProcessed

func (a *ASNRequest) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

func (*ASNRequest) Valid

func (a *ASNRequest) Valid() bool

Valid performs input validation of the receiver.

type AddrRequest

type AddrRequest struct {
	Address string
	InScope bool
	Domain  string
	Tag     string
	Source  string
}

AddrRequest handles data needed throughout Service processing of a network address.

func (*AddrRequest) Clone

func (a *AddrRequest) Clone() pipeline.Data

Clone implements pipeline Data.

func (*AddrRequest) MarkAsProcessed

func (a *AddrRequest) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

func (*AddrRequest) Valid

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

type DNSRequest struct {
	Name    string
	Domain  string
	Records []DNSAnswer
	Tag     string
	Source  string
}

DNSRequest handles data needed throughout Service processing of a DNS name.

func (*DNSRequest) Clone

func (d *DNSRequest) Clone() pipeline.Data

Clone implements pipeline Data.

func (*DNSRequest) MarkAsProcessed

func (d *DNSRequest) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

func (*DNSRequest) Valid

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) Clone

func (o *Output) Clone() pipeline.Data

Clone implements pipeline Data.

func (*Output) Complete

func (o *Output) Complete(passive bool) bool

Complete checks that all the required fields have been populated.

func (*Output) MarkAsProcessed

func (o *Output) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

type ResolvedRequest

type ResolvedRequest struct {
	Name    string
	Domain  string
	Records []DNSAnswer
	Tag     string
	Source  string
}

func (*ResolvedRequest) Clone

func (r *ResolvedRequest) Clone() pipeline.Data

Clone implements pipeline Data.

func (*ResolvedRequest) MarkAsProcessed

func (r *ResolvedRequest) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

func (*ResolvedRequest) Valid

func (r *ResolvedRequest) Valid() bool

Valid performs input validation of the receiver.

type SubdomainRequest

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

func (s *SubdomainRequest) Clone() pipeline.Data

Clone implements pipeline Data.

func (*SubdomainRequest) MarkAsProcessed

func (s *SubdomainRequest) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

func (*SubdomainRequest) Valid

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

type ZoneXFRRequest struct {
	Name   string
	Domain string
	Server string
	Tag    string
	Source string
}

ZoneXFRRequest handles zone transfer requests.

func (*ZoneXFRRequest) Clone

func (z *ZoneXFRRequest) Clone() pipeline.Data

Clone implements pipeline Data.

func (*ZoneXFRRequest) MarkAsProcessed

func (z *ZoneXFRRequest) MarkAsProcessed()

MarkAsProcessed implements pipeline Data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址