utils

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateDelayWithJitter added in v0.0.257

func CalculateDelayWithJitter(baseDelaySeconds int, jitterPercent int) time.Duration

func GetEntriesFromTXTFiles added in v0.0.83

func GetEntriesFromTXTFiles(paths []string) ([]string, error)

GetEntriesFromTXTFiles returns a list of entries from a list of text files

func IsHostInScope added in v0.0.283

func IsHostInScope(baseURL string, targetURL string) bool

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. This is the shared scoping check used by the ignore-cross-domain flag across discovery commands.

func IsStaticAsset added in v0.0.83

func IsStaticAsset(url string) bool

IsStaticAsset returns true if the URL is a static asset, false otherwise

func IsTrailingSlashRedirect added in v0.0.97

func IsTrailingSlashRedirect(from, to string) bool

IsTrailingSlashRedirect checks if the redirect is just adding a trailing slash

func ParseResponseCodes added in v0.0.120

func ParseResponseCodes(responseCodes string) (map[int]bool, error)

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.

Types

This section is empty.

Directories

Path Synopsis
Package useragent resolves User-Agent strings from a preset enum.
Package useragent resolves User-Agent strings from a preset enum.

Jump to

Keyboard shortcuts

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