I am trying to understand the DNS wire format used in DNS over HTTP:
This page mentions the query for www.example.com:
curl -D - -X GET -H "accept: application/dns-json" "http://127.0.0.1:8553/dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB"
I want to know how the AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB was generated for www.example.com ?
echo "www.example.com" | base64
d3d3LmV4YW1wbGUuY29tCg==
echo "AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB" | base64 -d
wwwexamplecom
Clearly, I am missing something here. It appears that the wire format is just not base64 encoded version of the domain name?
I built on the answer/links from Denver's response.
Here is a python snippet to generate the wire format: