utils

package
v0.0.0-...-2d6eb31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Version = `0.0.1`

Version is the current version of dnsx

Variables

This section is empty.

Functions

func GetHTTPRequest

func GetHTTPRequest(url string, headers map[string]string) *fasthttp.Response

GET HTTP wrapper

func MergeChannels

func MergeChannels(channels ...<-chan Result) <-chan Result

Merge multiple channels from type Result

func PostHTTPRequest

func PostHTTPRequest(url string, data []byte) *fasthttp.Response

POST HTTP wrapper

func PrintResults

func PrintResults(json bool, results <-chan Result)

Print results as JSON or plain

func RemoveDuplicateStr

func RemoveDuplicateStr(strSlice []string) []string

Remove duplicate strings

func RemoveDuplicates

func RemoveDuplicates(input <-chan Result) <-chan Result

Remove duplicates from a channel and return a channel from type Result

func ShowBanner

func ShowBanner()

showBanner is used to show the banner to the user

func WriteJSON

func WriteJSON(results <-chan Result)

Print results as JSON

Types

type Options

type Options struct {
	SearchString string // UA id is the word to find for
	Silent       bool   // Silent suppresses any extra text and only writes the output to screen
	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

type Result

type Result struct {
	Value  string
	Source string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL