dnsUtils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAvailability

func CheckAvailability(domain string, ns *dns.NS, c *dns.Client) (*dns.Msg, time.Duration, error)

Checks if a domain name has an A record

func CheckSOA

func CheckSOA(line string, servers []string, c *dns.Client) (*dns.Msg, error)

Verifies if a SOA record exists for the given domain name

func ExchangeWithRetry

func ExchangeWithRetry(m *dns.Msg, c *dns.Client, server []string) (*dns.Msg, time.Duration, error)

Make a DNS request retrying 3 times

func FindKey

func FindKey(dnskeys *dns.Msg, rrsig *dns.RRSIG) *dns.DNSKEY

Look for the key that signed the given RRSIG, if found, it returns it.

func GetAAAARecords

func GetAAAARecords(line string, servers []string, c *dns.Client) ([]net.IP, error)

Request for the AAAA records for the given domain

func GetARecords

func GetARecords(line string, servers []string, c *dns.Client) ([]net.IP, error)

Request for the A records for the given domain

func GetRecordSet

func GetRecordSet(line string, t uint16, server []string, c *dns.Client) (*dns.Msg, time.Duration, error)

Makes a request for a recor set

func GetRecordSetTCP

func GetRecordSetTCP(line string, t uint16, server string, c *dns.Client) (*dns.Msg, time.Duration, error)

Request a record set using TCP

func GetRecordSetWithDNSSEC

func GetRecordSetWithDNSSEC(line string, t uint16, servers []string, c *dns.Client) (*dns.Msg, time.Duration, error)

Request a record set using DNSSEC

func GetRecursivityAndEDNS

func GetRecursivityAndEDNS(line string, server string, port string, c *dns.Client) (*dns.Msg, time.Duration, error)

Makes a request using recursivity and EDNS

func Less

func Less(a, b string) int

less returns <0 when a is less than b, 0 when they are equal and >0 when a is larger than b. The function orders names in DNSSEC canonical order: RFC 4034s section-6.1

See http://bert-hubert.blogspot.co.uk/2015/10/how-to-do-fast-canonical-ordering-of.html for a blog article on this implementation, although here we still go label by label.

The values of a and b are *not* lowercased before the comparison!

func ZoneTransfer

func ZoneTransfer(line string, ns string) (chan *dns.Envelope, error)

Requests Zone Transfer

Types

This section is empty.

Jump to

Keyboard shortcuts

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