Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add !dns command to query the DNS #11

Open
Roobarb opened this issue Nov 6, 2016 · 1 comment
Open

Add !dns command to query the DNS #11

Roobarb opened this issue Nov 6, 2016 · 1 comment

Comments

@Roobarb
Copy link
Member

Roobarb commented Nov 6, 2016

!dns nos.nl
should return "145.58.28.175, 145.58.29.114" (A records only by default)

and other types of records can be specified:
!dns AAAA nos.nl
should return "2a02:458:101:28:10:28::af"
!dns MX nos.nl
should return "12 mx-a.mf.surf.net, 12 mx-1.mf.surf.net."

@casdr
Copy link
Member

casdr commented Nov 6, 2016

If you don't want to do exec stuff locally, http://digweb.herokuapp.com/ might be useful:

$ curl http://digweb.herokuapp.com/ -d "nos.nl"

; <<>> DiG 9.9.5-3ubuntu0.9-Ubuntu <<>> nos.nl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51881
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;nos.nl.                IN  A

;; ANSWER SECTION:
nos.nl.         3600    IN  A   145.58.28.175
nos.nl.         3600    IN  A   145.58.29.114

;; Query time: 111 msec
;; SERVER: 172.16.0.23#53(172.16.0.23)
;; WHEN: Sun Nov 06 21:58:24 UTC 2016
;; MSG SIZE  rcvd: 67
$ curl http://digweb.herokuapp.com/ -d "nos.nl MX"

; <<>> DiG 9.9.5-3ubuntu0.9-Ubuntu <<>> nos.nl MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42452
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;nos.nl.                IN  MX

;; ANSWER SECTION:
nos.nl.         300 IN  MX  12 mx-a.mf.surf.net.
nos.nl.         300 IN  MX  12 mx-1.mf.surf.net.

;; Query time: 108 msec
;; SERVER: 172.16.0.23#53(172.16.0.23)
;; WHEN: Sun Nov 06 21:59:18 UTC 2016
;; MSG SIZE  rcvd: 88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants