wildcards

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadResolversFromFile added in v1.1.0

func LoadResolversFromFile(file string) ([]string, error)

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver represents a dns resolver for removing wildcards

func NewResolver

func NewResolver(domains []string, retries int, resolvers []string) (*Resolver, error)

NewResolver initializes and creates a new resolver to find wildcards

func (*Resolver) LookupHost

func (w *Resolver) LookupHost(host string) (bool, map[string]struct{})

LookupHost returns wildcard IP addresses of a wildcard if it's a wildcard. To determine, first we split the target host by dots, create permutation of it's levels, check for wildcard on each one of them and if found any, we remove all the hosts that have this IP from the map.

type Store added in v1.1.0

type Store struct {
	// contains filtered or unexported fields
}

func NewStore added in v1.1.0

func NewStore() *Store

func (*Store) Clear added in v1.1.0

func (s *Store) Clear()

func (*Store) Delete added in v1.1.0

func (s *Store) Delete(wildcard string)

func (*Store) Has added in v1.1.0

func (s *Store) Has(wildcard string) bool

func (*Store) IsEmpty added in v1.1.0

func (s *Store) IsEmpty() bool

func (*Store) Iterate added in v1.1.0

func (s *Store) Iterate(f func(wildcard string) error) error

func (*Store) LoadFromFile added in v1.1.0

func (s *Store) LoadFromFile(file string) error

func (*Store) SaveToFile added in v1.1.0

func (s *Store) SaveToFile(file string) error

func (*Store) Set added in v1.1.0

func (s *Store) Set(wildcard string) error

Jump to

Keyboard shortcuts

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