Dig command enhanced / written pure Go

Byarshadrad

Dig command enhanced / written pure Go

Dig

ns/united states/redwood city> dig yahoo.com
Trying to query server: 204.152.184.76 united states redwood city
;; opcode: QUERY, status: NOERROR, id: 19850
;; flags: qr rd ra;
yahoo.com.  728 IN  MX  1 mta6.am0.yahoodns.net.
yahoo.com.  728 IN  MX  1 mta5.am0.yahoodns.net.
yahoo.com.  728 IN  MX  1 mta7.am0.yahoodns.net.
yahoo.com.  143013  IN  NS  ns4.yahoo.com.
yahoo.com.  143013  IN  NS  ns6.yahoo.com.
yahoo.com.  143013  IN  NS  ns2.yahoo.com.
yahoo.com.  143013  IN  NS  ns5.yahoo.com.
yahoo.com.  143013  IN  NS  ns1.yahoo.com.
yahoo.com.  143013  IN  NS  ns3.yahoo.com.

;; ADDITIONAL SECTION:
ns1.yahoo.com.  561456  IN  A   68.180.131.16
ns2.yahoo.com.  27934   IN  A   68.142.255.16
ns3.yahoo.com.  532599  IN  A   203.84.221.53
ns4.yahoo.com.  532599  IN  A   98.138.11.157
ns5.yahoo.com.  532599  IN  A   119.160.247.124
ns6.yahoo.com.  143291  IN  A   121.101.144.139
ns1.yahoo.com.  51624   IN  AAAA    2001:4998:130::1001
ns2.yahoo.com.  51624   IN  AAAA    2001:4998:140::1002
ns3.yahoo.com.  51624   IN  AAAA    2406:8600:b8:fe03::1003
ns6.yahoo.com.  143291  IN  AAAA    2406:2000:108:4::1006
;; Query time: 1204 ms

;; CHAOS CLASS BIND
version.bind.   0   CH  TXT "9.10.4-P1"
hostname.bind.  0   CH  TXT "fred.isc.org"

Dig Trace:


ns/united states/redwood city> dig yahoo.com +trace
.	12457	IN	NS	h.root-servers.net.
.	12457	IN	NS	l.root-servers.net.
.	12457	IN	NS	d.root-servers.net.
.	12457	IN	NS	k.root-servers.net.
.	12457	IN	NS	j.root-servers.net.
.	12457	IN	NS	i.root-servers.net.
.	12457	IN	NS	e.root-servers.net.
.	12457	IN	NS	b.root-servers.net.
.	12457	IN	NS	c.root-servers.net.
.	12457	IN	NS	g.root-servers.net.
.	12457	IN	NS	m.root-servers.net.
.	12457	IN	NS	a.root-servers.net.
.	12457	IN	NS	f.root-servers.net.
from: 204.152.184.76#53 in 26 ms
com.	172800	IN	NS	a.gtld-servers.net.
com.	172800	IN	NS	b.gtld-servers.net.
com.	172800	IN	NS	c.gtld-servers.net.
com.	172800	IN	NS	d.gtld-servers.net.
com.	172800	IN	NS	e.gtld-servers.net.
com.	172800	IN	NS	f.gtld-servers.net.
com.	172800	IN	NS	g.gtld-servers.net.
com.	172800	IN	NS	h.gtld-servers.net.
com.	172800	IN	NS	i.gtld-servers.net.
com.	172800	IN	NS	j.gtld-servers.net.
com.	172800	IN	NS	k.gtld-servers.net.
com.	172800	IN	NS	l.gtld-servers.net.
com.	172800	IN	NS	m.gtld-servers.net.
from: h.root-servers.net.#53 in 96 ms
yahoo.com.	172800	IN	NS	ns1.yahoo.com.
yahoo.com.	172800	IN	NS	ns5.yahoo.com.
yahoo.com.	172800	IN	NS	ns2.yahoo.com.
yahoo.com.	172800	IN	NS	ns3.yahoo.com.
yahoo.com.	172800	IN	NS	ns4.yahoo.com.
from: a.gtld-servers.net.#53 in 37 ms
yahoo.com.	1800	IN	SOA	ns1.yahoo.com. hostmaster.yahoo-inc.com. 2016082401 3600 300 1814400 600
yahoo.com.	1800	IN	A	98.139.183.24
yahoo.com.	1800	IN	A	206.190.36.45
yahoo.com.	1800	IN	A	98.138.253.109
yahoo.com.	300	IN	AAAA	2001:4998:58:c02::a9
yahoo.com.	300	IN	AAAA	2001:4998:c:a06::2:4008
yahoo.com.	300	IN	AAAA	2001:4998:44:204::a7
yahoo.com.	1800	IN	MX	1 mta6.am0.yahoodns.net.
yahoo.com.	1800	IN	MX	1 mta5.am0.yahoodns.net.
yahoo.com.	1800	IN	MX	1 mta7.am0.yahoodns.net.
yahoo.com.	172800	IN	NS	ns1.yahoo.com.
yahoo.com.	172800	IN	NS	ns4.yahoo.com.
yahoo.com.	172800	IN	NS	ns2.yahoo.com.
yahoo.com.	172800	IN	NS	ns3.yahoo.com.
yahoo.com.	172800	IN	NS	ns6.yahoo.com.
yahoo.com.	172800	IN	NS	ns5.yahoo.com.
yahoo.com.	1800	IN	TXT	"v=spf1 redirect=_spf.mail.yahoo.com"
from: ns1.yahoo.com.#53 in 18 ms

GitHub

https://github.com/mehrdadrad/mylg/blob/master/ns/ns.go

Leave a Reply