{"modulePath":"github.com/Method-Security/webscan","version":"v0.41.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Functions\n\n```go\nfunc CalculateDelayWithJitter(baseDelaySeconds int, jitterPercent int) time.Duration\n```\n\n```go\nfunc GetEntriesFromTXTFiles(paths []string) ([]string, error)\n```\nGetEntriesFromTXTFiles returns a list of entries from a list of text files\n\n```go\nfunc IsHostInScope(baseURL string, targetURL string) bool\n```\nIsHostInScope 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.\n\n```go\nfunc IsStaticAsset(url string) bool\n```\nIsStaticAsset returns true if the URL is a static asset, false otherwise\n\n```go\nfunc IsTrailingSlashRedirect(from, to string) bool\n```\nIsTrailingSlashRedirect checks if the redirect is just adding a trailing slash. Default ports are normalized so [https://host:443/path](https://host:443/path) and [https://host/path/](https://host/path/) are treated as the same origin.\n\n```go\nfunc ParseResponseCodes(responseCodes string) (map[int]bool, error)\n```\nParseResponseCodes parses a comma-separated or range-based string of response codes (e.g., \"200,301,404-410\") and returns a map of valid codes.\n\n","path":"github.com/Method-Security/webscan/utils","name":"utils","synopsis":"","isRedistributable":true}
