Example project to parse DNS headers in javascript.
Find a file
2017-09-27 16:48:40 -07:00
.gitignore Initial commit 2017-09-22 22:48:52 -07:00
data.dns.bin Removed the pcap headers from the data file and renamed it. 2017-09-27 16:48:40 -07:00
data.pcap Removed the pcap headers from the data file and renamed it. 2017-09-27 16:48:40 -07:00
data.udp.bin Removed the pcap headers from the data file and renamed it. 2017-09-27 16:48:40 -07:00
encoded Catpured packet and inserting into ArrayBuffer. 2017-09-23 17:51:04 -07:00
index.htm Done with basic parser. 2017-09-25 15:22:52 -07:00
index.js Removed unecessary global 2017-09-27 14:26:10 -07:00
package.json We need to deal with the tcpdump headers as well :eyeroll: 2017-09-25 11:06:36 -07:00
README.md Removed the pcap headers from the data file and renamed it. 2017-09-27 16:48:40 -07:00

DNSparse

Playing around with parsing dns packets in Javascript.

ToDo

  • Import packet string into Arraybuffer
  • Parse the headers into a Javascript object
  • Test/Fix browser JS compatibility

To see the parsed result of the packet, clone the repo and :

npm install && npm run

To view in the browser, open index.html in your browser and look at the console output.

The raw packet that is parsed has also been saved as ./data.udp.bin, if you would like to look at it to parse it some other way.