项目作者: vishen

项目描述 :
Golang handcrafted dns query
高级语言: Go
项目地址: git://github.com/vishen/go-dnsquery.git
创建时间: 2018-01-11T19:58:05Z
项目社区:https://github.com/vishen/go-dnsquery

开源协议:

下载


Manual DNS Lookup

This is an example of how to query a DNS server (in this example “8.8.8.8”) for “A” records using handcrafted packets.

This shows the raw bytes to send to a DNS server in order to receive an answer.

Running

  1. $ go run main.go
  2. DNS query results for 'example.com' against '8.8.8.8:53'
  3. >> Domain exists!
  4. >> encodedQuery: 0xaaaa01000001000000000000076578616d706c6503636f6d0000010001
  5. >> encodedAnswer: 0xaaaa81800001000100000000076578616d706c6503636f6d0000010001

Resources

  1. - https://routley.io/tech/2017/12/28/hand-writing-dns-messages.html