dig命令使用详解|使用dig命令挖掘域名解析信息

root@xg:~# dig qq.com; <<>> DiG 9.11.5-P1-1-Debian <<>> qq.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28913
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;qq.com.                                IN      A;; ANSWER SECTION:
qq.com.                 273     IN      A       61.129.7.47
qq.com.                 273     IN      A       123.151.137.18
qq.com.                 273     IN      A       183.3.226.35;; Query time: 35 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: 三 1月 27 00:32:21 CST 2021
;; MSG SIZE  rcvd: 83
root@xg:~# dig -t A qq.com @8.8.8.8; <<>> DiG 9.11.5-P1-1-Debian <<>> -t A qq.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40077
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;qq.com.                                IN      A;; ANSWER SECTION:
qq.com.                 599     IN      A       123.151.137.18
qq.com.                 599     IN      A       61.129.7.47
qq.com.                 599     IN      A       183.3.226.35;; Query time: 549 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: 三 1月 27 00:47:20 CST 2021
;; MSG SIZE  rcvd: 83root@xg:~# dig @114.114.114.114 qq.com any; <<>> DiG 9.11.5-P1-1-Debian <<>> @114.114.114.114 qq.com any
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37833
;; flags: qr rd ra; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;qq.com.                                IN      ANY;; ANSWER SECTION:
qq.com.                 1660    IN      MX      30 mx1.qq.com.
qq.com.                 1660    IN      MX      20 mx2.qq.com.
qq.com.                 1660    IN      MX      10 mx3.qq.com.
qq.com.                 284     IN      A       61.129.7.47
qq.com.                 284     IN      A       123.151.137.18
qq.com.                 284     IN      A       183.3.226.35
qq.com.                 75049   IN      NS      ns4.qq.com.
qq.com.                 75049   IN      NS      ns2.qq.com.
qq.com.                 75049   IN      NS      ns1.qq.com.
qq.com.                 75049   IN      NS      ns3.qq.com.;; Query time: 259 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: 三 1月 27 00:52:13 CST 2021
;; MSG SIZE  rcvd: 21
root@xg:~# dig -x 209.132.183.81; <<>> DiG 9.11.5-P1-1-Debian <<>> -x 209.132.183.81
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62797
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;81.183.132.209.in-addr.arpa.   IN      PTR;; ANSWER SECTION:
81.183.132.209.in-addr.arpa. 599 IN     PTR     www.redhat.com.;; Query time: 297 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: 三 1月 27 01:18:18 CST 2021
;; MSG SIZE  rcvd: 84
root@xg:~# echo baidu.com > domains.txt
root@xg:~# echo qq.com >> domains.txt      
root@xg:~# echo csdn.com >> domains.txt  
root@xg:~# echo 163.com >> domains.txt 
root@xg:~# dig -f domains.txt any  +noall +answer  
baidu.com.              34      IN      MX      20 mx1.baidu.com.
baidu.com.              34      IN      MX      15 mx.n.shifen.com.
baidu.com.              34      IN      MX      20 mx50.baidu.com.
baidu.com.              34      IN      MX      20 jpmx.baidu.com.
baidu.com.              34      IN      MX      10 mx.maillb.baidu.com.
baidu.com.              337     IN      A       39.156.69.79
baidu.com.              337     IN      A       220.181.38.148
baidu.com.              86387   IN      NS      ns7.baidu.com.
baidu.com.              86387   IN      NS      ns3.baidu.com.
baidu.com.              86387   IN      NS      dns.baidu.com.
baidu.com.              86387   IN      NS      ns2.baidu.com.
baidu.com.              86387   IN      NS      ns4.baidu.com.
qq.com.                 5485    IN      MX      10 mx3.qq.com.
qq.com.                 5485    IN      MX      30 mx1.qq.com.
qq.com.                 5485    IN      MX      20 mx2.qq.com.
qq.com.                 34      IN      A       61.129.7.47
qq.com.                 34      IN      A       183.3.226.35
qq.com.                 34      IN      A       123.151.137.18
qq.com.                 10374   IN      NS      ns4.qq.com.
qq.com.                 10374   IN      NS      ns3.qq.com.
qq.com.                 10374   IN      NS      ns1.qq.com.
qq.com.                 10374   IN      NS      ns2.qq.com.
csdn.com.               599     IN      MX      10 mxbiz2.qq.com.
csdn.com.               599     IN      MX      5 mxbiz1.qq.com.
csdn.com.               350     IN      A       47.95.164.112
csdn.com.               1231    IN      NS      dns13.hichina.com.
csdn.com.               1231    IN      NS      dns14.hichina.com.
163.com.                17720   IN      MX      10 163mx02.mxmail.netease.com.
163.com.                17720   IN      MX      50 163mx00.mxmail.netease.com.
163.com.                17720   IN      MX      10 163mx03.mxmail.netease.com.
163.com.                17720   IN      MX      10 163mx01.mxmail.netease.com.
163.com.                421     IN      A       123.58.180.8
163.com.                421     IN      A       123.58.180.7
163.com.                29162   IN      NS      ns8.166.com.
163.com.                29162   IN      NS      ns3.nease.net.
163.com.                29162   IN      NS      ns6.nease.net.
163.com.                29162   IN      NS      ns4.nease.net.
163.com.                29162   IN      NS      ns2.166.com.
163.com.                29162   IN      NS      ns1.nease.net.
163.com.                29162   IN      NS      ns5.nease.net.
root@xg:~# dig txt chaos VERSION.BIND @ns3.dnsv4.com  
;; Warning: query response not set
;; Warning: Message parser reports malformed message packet.; <<>> DiG 9.11.5-P1-1-Debian <<>> txt chaos VERSION.BIND @ns3.dnsv4.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44766
;; flags: rd ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available;; QUESTION SECTION:
;VERSION.BIND.                  CH      TXT;; ANSWER SECTION:
VERSION.BIND.           0       CH      TXT     "DNSPod AUTHORITY DNS 5.1.2011.00";; Query time: 69 msec
;; SERVER: 162.14.25.247#53(162.14.25.247)
;; WHEN: 三 1月 27 01:42:49 CST 2021
;; MSG SIZE  rcvd: 75
root@xg:~# dig baidu.com +trace +short @114.114.114.114
NS f.root-servers.net. from server 114.114.114.114 in 44 ms.
NS i.root-servers.net. from server 114.114.114.114 in 44 ms.
NS b.root-servers.net. from server 114.114.114.114 in 44 ms.
NS c.root-servers.net. from server 114.114.114.114 in 44 ms.
NS j.root-servers.net. from server 114.114.114.114 in 44 ms.
NS l.root-servers.net. from server 114.114.114.114 in 44 ms.
NS a.root-servers.net. from server 114.114.114.114 in 44 ms.
NS d.root-servers.net. from server 114.114.114.114 in 44 ms.
NS h.root-servers.net. from server 114.114.114.114 in 44 ms.
NS g.root-servers.net. from server 114.114.114.114 in 44 ms.
NS e.root-servers.net. from server 114.114.114.114 in 44 ms.
NS k.root-servers.net. from server 114.114.114.114 in 44 ms.
NS m.root-servers.net. from server 114.114.114.114 in 44 ms.
A 220.181.38.148 from server 220.181.33.31 in 45 ms.
A 39.156.69.79 from server 220.181.33.31 in 45 ms.

 

本文链接:https://my.lmcjl.com/post/2019.html

展开阅读全文

4 评论

留下您的评论.