Closed Miniwoffer closed 9 months ago
I've added a flag to the CLI that lets us easily access the new functionality.
``` console $ go run ./cmd/dnsr/main.go -v google.com TXT ╭─── resolve("google.com.", "TXT", 1) │ ╭─── resolve("google.com.", "NS", 2) │ │ ╭─── resolve("com.", "NS", 3) │ │ │ 23ms (T- 1999ms): dig +norecurse @d.root-servers.net. com. NS # rmsg: NOERROR Answer: 0 NS: 13 Extra: 15 │ │ ╰─── 23ms: resolve("com.", "NS", 3) # [26]RR = NS(com.)=a.gtld-servers.net. NS(com.)=b.gtld-servers.net. ... X 34ms (T- 1999ms): dig +norecurse @c.root-servers.net. com. NS # rmsg: NOERROR Answer: 0 NS: 13 Extra: 15 == CANCELED == │ │ 87ms (T- 1976ms): dig +norecurse @a.gtld-servers.net. google.com. NS # rmsg: NOERROR Answer: 0 NS: 4 Extra: 8 │ ╰─── 111ms: resolve("google.com.", "NS", 2) # [8]RR = NS(google.com.)=ns2.google.com. NS(google.com.)=ns1.google.com. ... X 94ms (T- 1976ms): dig +norecurse @b.gtld-servers.net. google.com. NS # rmsg: NOERROR Answer: 0 NS: 4 Extra: 8 == CANCELED == │ 25ms (T- 1888ms): dig +norecurse @ns1.google.com. google.com. TXT # rmsg: NOERROR Answer: 6 NS: 0 Extra: 0 ╰─── 137ms: resolve("google.com.", "TXT", 1) # [10]RR = TXT(google.com.)=atlassian-domain-verification=5YjTmWmjI92ewqkx2oXmBaD60Td9zWon9r6eakvHX6B77zzkFQto8PQ9QsKnbf4I TXT(google.com.)=google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ ... ;; RESULTS: google.com. 3600 IN TXT atlassian-domain-verification=5YjTmWmjI92ewqkx2oXmBaD60Td9zWon9r6eakvHX6B77zzkFQto8PQ9QsKnbf4I google.com. 3600 IN TXT google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ google.com. 3600 IN TXT webexdomainverification.8YX6G=6e6922db-e3e6-4a36-904e-a805c28087fa google.com. 3600 IN TXT globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8= google.com. 3600 IN TXT MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB google.com. 3600 IN TXT onetrust-domain-verification=de01ed21f2fa4d8781cbc3ffb89cf4ef google.com. 3600 IN NS ns2.google.com. google.com. 3600 IN NS ns1.google.com. google.com. 3600 IN NS ns3.google.com. google.com. 3600 IN NS ns4.google.com. ;; TRUE google.com TXT ;; Elapsed: 138.206625ms ``` ``` console $ go run ./cmd/dnsr/main.go -v -t google.com TXT ╭─── resolve("google.com.", "TXT", 1) │ ╭─── resolve("google.com.", "NS", 2) │ │ ╭─── resolve("com.", "NS", 3) │ │ │ 29ms (T- 1999ms): dig +norecurse @c.root-servers.net. com. NS # rmsg: NOERROR Answer: 0 NS: 13 Extra: 15 │ │ ╰─── 30ms: resolve("com.", "NS", 3) # [26]RR = NS(com.)=f.gtld-servers.net. NS(com.)=h.gtld-servers.net. ... │ │ 32ms (T- 1969ms): dig +norecurse @h.gtld-servers.net. google.com. NS # rmsg: NOERROR Answer: 0 NS: 4 Extra: 8 │ ╰─── 63ms: resolve("google.com.", "NS", 2) # [8]RR = NS(google.com.)=ns2.google.com. NS(google.com.)=ns1.google.com. ... X 38ms (T- 1969ms): dig +norecurse @f.gtld-servers.net. google.com. NS # rmsg: NOERROR Answer: 0 NS: 4 Extra: 8 == CANCELED == X 93ms (T- 1999ms): dig +norecurse @b.root-servers.net. com. NS # rmsg: NOERROR Answer: 0 NS: 13 Extra: 12 == CANCELED == │ 21ms (T- 1936ms): dig +norecurse @ns1.google.com. google.com. TXT # rmsg: NOERROR Answer: 12 NS: 0 Extra: 0 ╰─── 134ms: resolve("google.com.", "TXT", 1) # [16]RR = TXT(google.com.)=v=spf1 include:_spf.google.com ~all TXT(google.com.)=apple-domain-verification=30afIBcvSuDV2PLX ... ;; RESULTS: google.com. 3600 IN TXT v=spf1 include:_spf.google.com ~all google.com. 3600 IN TXT apple-domain-verification=30afIBcvSuDV2PLX google.com. 3600 IN TXT atlassian-domain-verification=5YjTmWmjI92ewqkx2oXmBaD60Td9zWon9r6eakvHX6B77zzkFQto8PQ9QsKnbf4I google.com. 3600 IN TXT globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8= google.com. 3600 IN TXT onetrust-domain-verification=de01ed21f2fa4d8781cbc3ffb89cf4ef google.com. 3600 IN TXT docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e google.com. 3600 IN TXT docusign=1b0a6754-49b1-4db5-8540-d2c12664b289 google.com. 3600 IN TXT facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95 google.com. 3600 IN TXT google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ google.com. 3600 IN TXT MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB google.com. 3600 IN TXT google-site-verification=wD8N7i1JTNTkezJ49swvWW48f8_9xveREV4oB-0Hf5o google.com. 3600 IN TXT webexdomainverification.8YX6G=6e6922db-e3e6-4a36-904e-a805c28087fa google.com. 3600 IN NS ns2.google.com. google.com. 3600 IN NS ns1.google.com. google.com. 3600 IN NS ns3.google.com. google.com. 3600 IN NS ns4.google.com. ;; TRUE google.com TXT ;; Elapsed: 135.228541ms ```
Sorry, merge/rebase got a little messy here and I didn't realize I was pushing to your fork. I intended to include your work in #118 and add the test from #112.
Closing in favor of #120
I was unable to push more changes and re-open #113 , so i created a new MR instead.