dns

package
v0.0.0-...-62bb9e5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQuestions

func GetQuestions(nfp *netfilter.Packet) (questions []string)

GetQuestions retrieves the domain names a process is trying to resolve.

func Host

func Host(resolved string) (host string, found bool)

Host returns if a resolved domain is in the list.

func HostOr

func HostOr(ip net.IP, or string) string

HostOr checks if an IP has a domain name already resolved. If the domain is in the list it's returned, otherwise the IP will be returned.

func Track

func Track(resolved string, hostname string)

Track adds a resolved domain to the list.

func TrackAnswers

func TrackAnswers(packet gopacket.Packet) bool

TrackAnswers obtains the resolved domains of a DNS query. If the packet is UDP DNS, the domain names are added to the list of resolved domains.

Types

This section is empty.

Jump to

Keyboard shortcuts

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