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 IsPort(str string) bool
- func ToCidr(item string) *net.IPNet
- 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 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.
Click to show internal directories.
Click to hide internal directories.