dnsbl

package module
v0.0.0-...-8ed98f0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocklists

type Blocklists []string

Blocklists contains a slice filled with DNSBL entries. See New or Defaults funcs.

func New

func New() Blocklists

New returns an empty Blocklists type filled with the default collection of dnsbl's.

func (Blocklists) Check

func (bl Blocklists) Check(ip ReverseIP, verbose, test bool, w io.Writer) ([]string, error)

Check takes a string containing an IP address and a verbosity boolean. All dnsbl's in bl will be checked against the given IP. It will return a nil slice on error or contain the names of the dnsbl's that had an entry for the given IP and an error that will be nil on success or pass the error.

func (Blocklists) Defaults

func (bl Blocklists) Defaults() Blocklists

Defaults returns a Blocklists type filled with the default collection of dnsbl's. (see blocklists.go)

type ReverseIP

type ReverseIP string

ReverseIP contains a strip that usually is a result of ReverseIPAddress.

func ReverseIPAddress

func ReverseIPAddress(ip net.IP) (ReverseIP, error)

reverseIPAddress reverses IPv4 or IPv6 addresses for reverse lookups. The string is build to reflect the rules for arpa reverse resolution. Examples for localhost:

IPv4 = 1.0.0.127
IPv6 = 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Jump to

Keyboard shortcuts

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