Documentation
¶
Index ¶
- 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)
- func UnrestrictedCidrs() []string
- func UnrestrictedDomains() []string
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 is the anchor's host, under it, or under 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.
func ParseResponseCodes ¶ added in v0.0.120
ParseResponseCodes parses a comma-separated or range-based string of response codes (e.g., "200,301,404-410") and returns a map of valid codes.
func UnrestrictedCidrs ¶ added in v0.37.0
func UnrestrictedCidrs() []string
UnrestrictedCidrs is the CIDR list of UnrestrictedScope, for flat scope fields.
func UnrestrictedDomains ¶ added in v0.37.0
func UnrestrictedDomains() []string
UnrestrictedDomains is the domain list of UnrestrictedScope, for flat scope fields.
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.
func UnrestrictedScope ¶ added in v0.37.0
func UnrestrictedScope() *Scope
UnrestrictedScope admits every host.
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. |