dnsanalyzer

package
v0.0.0-...-a73b073 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSAnalyzer

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

func New

func New() *DNSAnalyzer

func (*DNSAnalyzer) Hostnames

func (d *DNSAnalyzer) Hostnames(address string) []string

Hostname returns the hostname used to obtain the given IP address.

Returns the hostnames found. Otherwise it returns an empty slice.

func (*DNSAnalyzer) LayerTypes

func (d *DNSAnalyzer) LayerTypes() []gopacket.LayerType

func (*DNSAnalyzer) Questions

func (d *DNSAnalyzer) Questions() map[string]map[string][]string

Questions returns all the DNS queries captured during the analysis run.

Returns a map where each key is the DNS class (e.g. "IN" or "CH") and the value is a map where each key is a domain name (e.g. "example.com") and the values is an array of each type that was requested (e.g. "A", "AAAA", "TXT").

For example:

{
    "IN": map[string][]string{
        "example.com": []string{"A", "AAAA"},
        "example.org": []string{"TXT"},
    },
}

func (*DNSAnalyzer) Receive

func (d *DNSAnalyzer) Receive(l gopacket.Layer, p gopacket.Packet)

Jump to

Keyboard shortcuts

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