hns_doh_loadbalancer/create_wireform.py
Nathan Woodburn d393e01a91
All checks were successful
Build Docker / Build_Docker (push) Successful in 35s
feat: Update to add regions
2024-10-09 20:21:07 +11:00

16 lines
309 B
Python

import base64
import dns.message
# Generate custom request
domain = "woodburn"
message = dns.message.make_query(domain, dns.rdatatype.A,id=0)
wireBytes = message.to_wire()
wire = base64.b64encode(wireBytes)
print(wire.decode("utf-8"))
# Read
message = dns.message.from_wire(wireBytes)
print(str(message))