Documentation ¶
Index ¶
- Constants
- func AsIPV4CIDR(IPV4 string) string
- func AsIPV4IpNet(IPV4 string) *net.IPNet
- func AsIPV6CIDR(IPV6 string) string
- func AsIPV6IpNet(IPV6 string) *net.IPNet
- func CanExtend(hosts ...string) bool
- 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 TryExtendIP(host string) (net.IP, error)
- func WhatsMyIP() (string, error)
Constants ¶
const ExtendIPDefaultPort = "80"
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 CanExtend ¶ added in v0.0.18
CanExtend determines if the provided hosts (ip,short ip, hostname) can be extended to ip
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 ¶ added in v0.0.4
Check if an IP address is part of the list of internal IPs we have declared
func IsInIpv6List ¶ added in v0.0.4
Check if an IP address is part of the list of internal IPs we have declared
func IsInternal ¶ added in v0.0.4
Check if an IP address is part of the list of internal IPs we have declared checks for all ipv4 and ipv6 list
func TryExtendIP ¶ added in v0.0.18
TryRealIP attemps to extend a host (ip, short ip, hostname) to its extended ip version
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.