Documentation ¶
Index ¶
- Constants
- func AnySubdomainRegex() *regexp.Regexp
- func CIDRSubset(cidr *net.IPNet, addr string, num int) []net.IP
- func GetWebPage(url string, hvals map[string]string) (string, error)
- func HexString(b []byte) string
- func IPv6NibbleFormat(ip string) string
- func NetHosts(cidr *net.IPNet) []net.IP
- func NewUniqueElements(orig []string, add ...string) []string
- func RangeHosts(start, end net.IP) []net.IP
- func ReverseIP(ip string) string
- func SetDialContext(dc DialCtx)
- func SubdomainRegex(domain string) *regexp.Regexp
- func UniqueAppend(orig []string, add ...string) []string
- type DialCtx
Constants ¶
View Source
const ( // An IPv4 regular expression IPv4RE = "((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[.]){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" // This regular expression + the base domain will match on all names and subdomains SUBRE = "(([_a-zA-Z0-9]{1}|[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]{1})[.]{1})+" )
View Source
const ( USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" ACCEPT = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" ACCEPT_LANG = "en-US,en;q=0.8" )
Variables ¶
This section is empty.
Functions ¶
func AnySubdomainRegex ¶
func CIDRSubset ¶
getCIDRSubset - Returns a subset of the hosts slice with num elements around the addr element
func IPv6NibbleFormat ¶
func NetHosts ¶
Obtained/modified the next two functions from the following: https://gist.github.com/kotakanbe/d3059af990252ba89a82
func NewUniqueElements ¶
NewUniqueElements - Removes elements that have duplicates in the original or new elements
func SetDialContext ¶
func SetDialContext(dc DialCtx)
func SubdomainRegex ¶
func UniqueAppend ¶
UniqueAppend - Behaves like the Go append, but does not add duplicate elements
Types ¶
Click to show internal directories.
Click to hide internal directories.