dnsanalyzer

package
v0.0.0-...-a149a6f Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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