1
0
Fork 0
dnsperf/contrib/ecs-gen/dnsperf-ecs-gen.py
Daniel Baumann dd7b5026ba
Adding upstream version 2.6.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-09 08:57:35 +01:00

10 lines
259 B
Python
Executable file

#!/usr/bin/env python3
import dns.edns
import sys
if len(sys.argv) > 1:
opt = dns.edns.ECSOption.from_text(sys.argv[1])
print("-e %d:%s" % (dns.edns.ECS, opt.to_wire().hex()))
else:
print("usage: dnsperf-ecs-gen.py <address/srclen[/scopelen]>")