Version: v2.2.2+incompatible Latest Latest

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 7 Imported by: 0



Package resolve is used to handle resolving records It also handles wildcard subdomains and rotating resolvers.



This section is empty.


View Source
var DefaultResolvers = []string{

DefaultResolvers contains the default list of resolvers known to be good


This section is empty.


type ResolutionPool

type ResolutionPool struct {
	Tasks   chan string
	Results chan Result
	// contains filtered or unexported fields

ResolutionPool is a pool of resolvers created for resolving subdomains for a given host.

func (*ResolutionPool) InitWildcards

func (r *ResolutionPool) InitWildcards(domain string) error

InitWildcards inits the wildcard ips array

type Resolver

type Resolver struct {
	// contains filtered or unexported fields

Resolver is a struct for resolving DNS names

func New

func New() *Resolver

New creates a new resolver struct with the default resolvers

func (*Resolver) AppendResolversFromFile

func (r *Resolver) AppendResolversFromFile(file string) error

AppendResolversFromFile appends the resolvers read from a file to the list of resolvers

func (*Resolver) AppendResolversFromSlice

func (r *Resolver) AppendResolversFromSlice(list []string)

AppendResolversFromSlice appends the slice to the list of resolvers

func (*Resolver) NewResolutionPool

func (r *Resolver) NewResolutionPool(workers int, removeWildcard bool) *ResolutionPool

NewResolutionPool creates a pool of resolvers for resolving subdomains of a given domain

type Result

type Result struct {
	Type  ResultType
	Host  string
	IP    string
	Error error

Result contains the result for a host resolution

type ResultType

type ResultType int

ResultType is the type of result found

const (
	Subdomain ResultType = iota

Types of data result can return

Jump to

Keyboard shortcuts

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