Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use valid DNS queries as largest UDP and TCP test payloads
EDNS0 option PADDING is used to inflate the queries. Largest UDP payload over IPv4 is 65507 bytes, 65527 for the IPv6. We go with IPv4. Oversized payloads are already tested using largest TCP payload (65535 bytes). Generated with dnspython 2.6.1: import dns.message m = dns.message.make_query('.', 'TYPE666') print(len(m.to_wire(max_size=65535))) m.options.append(dns.edns.GenericOption(dns.edns.OptionType.PADDING, '\x00' * 65475)) print(len(m.to_wire(max_size=65535))) binary = m.to_wire(max_size=65535) import struct binary = struct.pack('>H', len(binary)) + binary open('output.blob', 'wb').write(binary)
- Loading branch information