Summary
A dns wire format encoder and decoder would be great. This would be useful, when using dns over https (DoH) without json support or dns over tls (DoT). The binary format is specified in RFC 1035. The plaintext format can be something similar to the format used by dig.
Decode
Example Input
00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77
07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00
01
Example Output
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 0
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.example.com. IN A
Encode
For encoding I would suggest a format similar to the DNS over HTTPS operation.
Summary
A dns wire format encoder and decoder would be great. This would be useful, when using dns over https (DoH) without json support or dns over tls (DoT). The binary format is specified in RFC 1035. The plaintext format can be something similar to the format used by dig.
Decode
Example Input
Example Output
Encode
For encoding I would suggest a format similar to the DNS over HTTPS operation.