Documentation ¶
Overview ¶
Code taken and customized from https://raw.githubusercontent.com/projectdiscovery/mapcidr/24b047bfd50376c9e7f17123006d56cd6481d1e9/ip.go
Index ¶
- Constants
- Variables
- func CheckNumber(cidr string) bool
- func GetHTTPRequest(url string, headers map[string]string) *fasthttp.Response
- func GetNextIP(ip net.IP) net.IP
- func MergeChannels(channels ...<-chan Result) <-chan Result
- func PostHTTPRequest(url string, data []byte) *fasthttp.Response
- func PrintResults(json bool, results <-chan Result)
- func RemoveDuplicates(input <-chan Result) <-chan Result
- func RipeToCIDR(result string) (r []*net.IPNet)
- func ShowBanner()
- func WriteJSON(results <-chan Result)
- type Options
- type Result
Constants ¶
View Source
const Version = `0.0.3`
Version is the current version of dnsx
Variables ¶
View Source
var Values []string
Functions ¶
func CheckNumber ¶
func GetHTTPRequest ¶
GET HTTP wrapper
func GetNextIP ¶
GetNextIP returns the next IP from the given IP address. If the given IP is the last IP of a v4 or v6 range, the same IP is returned.
func MergeChannels ¶
Merge multiple channels from type Result
func PostHTTPRequest ¶
POST HTTP wrapper
func PrintResults ¶
Print results based on the given parameters
func RemoveDuplicates ¶
Remove duplicates from a channel and return a channel from type Result
func RipeToCIDR ¶
Types ¶
type Options ¶
type Options struct { SearchString string // Client to find CIDRs for" Silent bool // Show only results in output Stdin bool // Stdin specifies whether stdin input was given to the process Version bool // Version specifies if we should just show version and exit JSON bool // JSON output Output io.Writer }
Options
func ParseOptions ¶
func ParseOptions() *Options
ParseOptions parses the command line flags provided by a user
Source Files ¶
Click to show internal directories.
Click to hide internal directories.