Documentation
¶
Index ¶
- func AnchorScope(anchorURL string) ([]string, []string)
- func CalculateDelayWithJitter(baseDelaySeconds int, jitterPercent int) time.Duration
- func GetEntriesFromTXTFiles(paths []string) ([]string, error)
- func HostAllowed(scope *Scope, anchorURL string, candidateURL string) bool
- func HostInSeedScope(scope *Scope, candidateURL string) bool
- func IsHostInScope(baseURL string, targetURL string) bool
- func IsStaticAsset(url string) bool
- func IsTrailingSlashRedirect(from, to string) bool
- func ParseResponseCodes(responseCodes string) (map[int]bool, error)
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnchorScope ¶ added in v0.39.0
AnchorScope returns flat scope fields that admit only anchorURL's host and its subdomains.
func CalculateDelayWithJitter ¶ added in v0.0.257
func GetEntriesFromTXTFiles ¶ added in v0.0.83
GetEntriesFromTXTFiles returns a list of entries from a list of text files
func HostAllowed ¶ added in v0.37.0
HostAllowed reports whether candidateURL may be followed: any host without a scope, else the anchor's host, its subdomains, or a seed.
func HostInSeedScope ¶ added in v0.37.0
HostInSeedScope reports whether candidateURL's host is under a scope domain or inside a scope CIDR.
func IsHostInScope ¶ added in v0.0.283
IsHostInScope reports whether targetURL is the same host as baseURL or a subdomain (child) of it. The comparison is case-insensitive and ignores the port. Scope is anchored on the FULL base host, so children are allowed while the apex domain and sibling subdomains are excluded. For a base of www.example.com this admits www.example.com and app.www.example.com, but not example.com (parent) or careers.example.com (sibling). IP addresses have no subdomain hierarchy, so they require an exact match.
func IsStaticAsset ¶ added in v0.0.83
IsStaticAsset returns true if the URL is a static asset, false otherwise
func IsTrailingSlashRedirect ¶ added in v0.0.97
IsTrailingSlashRedirect checks if the redirect is just adding a trailing slash. Default ports are normalized so https://host:443/path and https://host/path/ are treated as the same origin.
Types ¶
type Scope ¶ added in v0.37.0
Scope is the seed domains and CIDRs a scan may follow and report beyond its target.
func NewScope ¶ added in v0.37.0
NewScope normalizes seed domains and CIDRs, returning nil when both are empty.
func ScopeOf ¶ added in v0.37.0
ScopeOf returns the seed scope for a config's flat scope fields, or nil when both are empty.
func ScopeWithAnchor ¶ added in v0.37.0
ScopeWithAnchor returns scope widened to include the anchor's host and its subdomains.
Directories
¶
| Path | Synopsis |
|---|---|
|
retry
Package retry retries rate-limited or transiently failed HTTP requests with jittered backoff.
|
Package retry retries rate-limited or transiently failed HTTP requests with jittered backoff. |
|
Package useragent resolves User-Agent strings from a preset enum.
|
Package useragent resolves User-Agent strings from a preset enum. |