Documentation ¶
Index ¶
- func AsIPV4CIDR(IPV4 string) string
- func AsIPV4IpNet(IPV4 string) *net.IPNet
- func AsIPV6CIDR(IPV6 string) string
- func AsIPV6IpNet(IPV6 string) *net.IPNet
- func GetBindableAddress(port int, ips ...string) (string, error)
- func GetSourceIP(target string) (net.IP, error)
- func IsCIDR(str string) bool
- func IsCidrWithExpansion(str string) bool
- func IsIP(str string) bool
- func IsIPv4(ips ...interface{}) bool
- func IsIPv6(ips ...interface{}) bool
- func IsInIpv4List(str string) bool
- func IsInIpv6List(str string) bool
- func IsInternal(str string) bool
- func IsPort(str string) bool
- func ToCidr(item string) *net.IPNet
- func ToFQDN(target string) ([]string, error)
- func WhatsMyIP() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsIPV4IpNet ¶
AsIPV4CIDR converts ipv4 cidr to net.IPNet pointer
func AsIPV6IpNet ¶
AsIPV6IpNet converts ipv6 cidr to net.IPNet pointer
func GetBindableAddress ¶
GetBindableAddress on port p from a list of ips
func GetSourceIP ¶
GetSourceIP gets the local ip based the destination ip
func IsCidrWithExpansion ¶
IsCIDR checks if the string is an valid CIDR after replacing - with /
func IsInIpv4List ¶
Check if an IP address is part of the list of internal IPs we have declared
func IsInIpv6List ¶
Check if an IP address is part of the list of internal IPs we have declared
func IsInternal ¶
Check if an IP address is part of the list of internal IPs we have declared checks for all ipv4 and ipv6 list
func WhatsMyIP ¶
WhatsMyIP attempts to obtain the external ip through public api Copied from https://github.com/projectdiscovery/naabu/blob/master/v2/pkg/scan/externalip.go
Types ¶
This section is empty.