Skip to content

Instantly share code, notes, and snippets.

@kjmkznr
Last active April 10, 2020 15:53
Show Gist options
  • Save kjmkznr/d5587c6f4d9cb38f87ce455a44d64c75 to your computer and use it in GitHub Desktop.
Save kjmkznr/d5587c6f4d9cb38f87ce455a44d64c75 to your computer and use it in GitHub Desktop.
>>> import base64
>>> import dnslib
>>>
>>> dnsmsg = 'f2+AgAABAAEAAAAAA3d3dwRyaXBlA25ldAAAAQABwAwAAQABAAA3+gAEwQAGiw=='
>>> dnslib.DNSRecord.parse(base64.b64decode(dnsmsg))
<DNS Header: id=0x7f6f type=RESPONSE opcode=QUERY flags=RA rcode='NOERROR' q=1 a=1 ns=0 ar=0>
<DNS Question: 'www.ripe.net.' qtype=A qclass=IN>
<DNS RR: 'www.ripe.net.' rtype=A rclass=IN ttl=14330 rdata='193.0.6.139'>
jq -r .[].resultset[].result.abuf RIPE-Atlas-measurement-24670095.json | \
python -c "import base64;import dnslib;import sys;[sys.stdout.write(str(dnslib.DNSRecord.parse(base64.b64decode(line))) + \"\n;;;;;;;;;;;;;;;;;;;;;;;;;\n\") for line in sys.stdin];"
import base64
import dnslib
dnsmsg = 'f2+AgAABAAEAAAAAA3d3dwRyaXBlA25ldAAAAQABwAwAAQABAAA3+gAEwQAGiw=='
dnslib.DNSRecord.parse(base64.b64decode(dnsmsg))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment