Unpack DNS Wireformat with Python -



Unpack DNS Wireformat with Python -

i trying unpack binary info dns (unbound). format (for example):

'\x00\x10\x03ns1\x06google\x03com\x00'

'\x00\x16\x00\n\x05aspmx\x01l\x06google\x03com\x00'

'\x00\x1b\x002\x04alt4\x05aspmx\x01l\x06google\x03com\x00'

i doing in python , have been trying unpack method of struct module.

yet, couldn't find proper way express format. can have help on that?

the dns wireformat can (and does) contain internal pointers within packet, falls outside python struct module intended do. on top of that, every single type of resource record needs unpacked according own specification.

parsing wireformat dns packets great way of learning how dns works, if goal done suggest finding library you. it's not hard task, it's lot of work.

python dns unpack

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -