name5

package module
v0.0.0-...-5e41065 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 10 Imported by: 0

README

name5

the main DNS code that powers professorOak's aggressive latteral resolver

go run ./ aol.com
---------name-
name: aol.com.
212.82.100.150
124.108.115.100
98.136.103.23
74.6.136.150
.,.,.
name: w2.src.vip.tw1.yahoo.com.
2406:2000:fc:c5f::a000
.,.,.
name: w2.src.vip.ir2.yahoo.com.
2a00:1288:110:c305::1:9000
.,.,.
name: w2.src.vip.bf1.yahoo.com.
2001:4998:124:1507::4000
.,.,.
name: w2.src.vip.sg3.yahoo.com.
106.10.248.150
2406:2000:e4:1605::4000
.,.,.
name: w2.src.vip.gq1.yahoo.com.
2001:4998:24:120d::5000
-------------


----------ptr-
ip: 2406:2000:e4:1605::4000 
ptr: w2.src.vip.sg3.yahoo.com.
+ - + - +
ip: 2001:4998:124:1507::4000 
ptr: w2.src.vip.bf1.yahoo.com.
+ - + - +
ip: 2a00:1288:110:c305::1:9000 
ptr: w2.src.vip.ir2.yahoo.com.
+ - + - +
ip: 106.10.248.150 
ptr: w2.src.vip.sg3.yahoo.com.
+ - + - +
ip: 124.108.115.100 
ptr: w2.src.vip.tw1.yahoo.com.
+ - + - +
ip: 74.6.136.150 
ptr: w2.src.vip.bf1.yahoo.com.
+ - + - +
ip: 98.136.103.23 
ptr: w2.src.vip.gq1.yahoo.com.
+ - + - +
ip: 212.82.100.150 
ptr: w2.src.vip.ir2.yahoo.com.
+ - + - +
ip: 2406:2000:fc:c5f::a000 
ptr: w2.src.vip.tw1.yahoo.com.
+ - + - +
ip: 2001:4998:24:120d::5000 
ptr: w2.src.vip.gq1.yahoo.com.
-------------

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIP = errors.New("invalid IP")

Functions

func Query4

func Query4(domain string) *dns.Msg

Query4 requests an A record answer

func Query6

func Query6(domain string) *dns.Msg

Query6 requests an AAAA record answer

func QueryPTR

func QueryPTR(ip string) *dns.Msg

QueryPTR retrievs reverse DNS records

func SmuggleError

func SmuggleError(err error) *dns.Msg

SmuggleError crafts a custom DNS answer to include our error message. This allows the function to only have one return, thus simplifying our pipeline. (maybe)

Types

type DNSMap

type DNSMap struct {
	IPToPTR   cmap.ConcurrentMap
	NameToIPs cmap.ConcurrentMap // map[string]*IPName
	// SeenIPs is a map of IP addresses that have been seen in the DNS query results
	// in theory this will be merged into an out of scope key/value store when the DNSMap is destroyed
	SeenIPs cmap.ConcurrentMap // map[string][]string
	Working *int64
	// contains filtered or unexported fields
}

DNSMap is used for resolving and keeping track of DNS query results and their relationships

func NewDNSMap

func NewDNSMap(name string) *DNSMap

NewDNSMap creates a new DNSMap type

type IPName

type IPName struct {
	Name string
	IPs  []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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