October 2018
Intermediate to advanced
528 pages
12h 33m
English
Besides the host command, you can also use the dig command to do DNS interrogation. The advantages of dig compared to host are its flexibility and clarity of output. With dig, you can ask the system to process a list of lookup requests from a file.
Let's use dig to interrogate the http://hackthissite.org domain.
Without providing any options besides the domain name, the dig command will only return the A record of a domain. To request any other DNS record type, we can provide the type option in the command line:
# dig hackthissite.org
; <<>> DiG 9.9.5-9+deb8u5-Debian <<>> hackthissite.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44321
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: ...Read now
Unlock full access