Dogs can look up!
dog
is an open-source DNS client for the command-line.
It has colourful output, supports the DoT and DoH protocols, and can emit JSON.
$ dog example.com A NS MX TXT A example.com. 18h34m32s 93.184.216.34 NS example.com. 1d0h00m00s "a.iana-servers.net." NS example.com. 1d0h00m00s "b.iana-servers.net." A a.iana-servers.net. 14m08s + 199.43.135.53 AAAA a.iana-servers.net. 25m23s + 2001:500:8f::53 A b.iana-servers.net. 7m03s + 199.43.133.53 AAAA b.iana-servers.net. 5m11s + 2001:500:8d::53 MX example.com. 23h53m37s 0 "" TXT example.com. 1d0h00m00s "v=spf1 -all"
Standard command-line options
dog lets you choose between a terse command-line syntax for fast invocations, and the
that you are used to.
$ dog --type TXT --query dog.wpodns.adtac.in --short "The dog (Canis familiaris when considered a distinct species or Canis lupus familiaris when considered..."
UDP, TCP, DoT, and DoH
dog supports the new DNS-over-TLS and DNS-over-HTTPS protocols.
$ dog -H @https://dns.google/dns-query lookup.dog A lookup.dog. 59m59s 138.68.117.94
JSON support
dog can output its results as JSON, making it suitable for automated scripts.
$ dog bsago.me --json | jq .responses[0].answers[0] { "address": "138.68.117.94", "class": "IN", "name": "bsago.me.", "ttl": 7111, "type": "A" }
Installation
The most recent version of dog is v0.1.0. Downloads are available on GitHub:
- Linux 64-bit: dog-v0.1.0-x86_64-unknown-linux-gnu.zip
- macOS 64-bit: dog-v0.1.0-x86_64-apple-darwin.zip
- Windows 64-bit: dog-v0.1.0-x86_64-pc-windows-msvc.zip
For more information, including instructions on compiling from source, see the Installation page.