| Server IP : 38.180.95.123 / Your IP : 216.73.216.230 Web Server : nginx/1.28.2 System : Linux v970193243.local 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : playbazecasino.com ( 1013) PHP Version : 8.4.23 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/python3-dnspython/examples/ |
Upload File : |
#!/usr/bin/env python3
import dns.edns
import dns.message
import dns.query
import dns.resolver
n = "."
t = dns.rdatatype.SOA
l = "google.com" # Address of l.root-servers.net, '199.7.83.42'
i = "ns1.isc.org" # Address of ns1.isc.org, for COOKIEs, '149.20.1.73'
o_list = []
# A query without options
o_list.append((l, dict()))
# The same query, but with empty options list
o_list.append((l, dict(options=[])))
# Use use_edns() to specify EDNS0 options, such as buffer size
o_list.append((l, dict(payload=2000)))
# With an NSID option, but with use_edns() to specify the options
edns_kwargs = dict(
edns=0, options=[dns.edns.GenericOption(dns.edns.OptionType.NSID, b"")]
)
o_list.append((l, edns_kwargs))
# With a COOKIE
o_list.append(
(
i,
dict(
options=[
dns.edns.GenericOption(
dns.edns.OptionType.COOKIE, b"0xfe11ac99bebe3322"
)
]
),
)
)
# With an ECS option using cloudflare dns address
o_list.append((l, dict(options=[dns.edns.ECSOption("1.1.1.1", 24)])))
# With an ECS option using the current machine address
import urllib.request
external_ip = urllib.request.urlopen("https://ident.me").read().decode("utf8")
o_list.append((l, dict(options=[dns.edns.ECSOption(external_ip, 24)])))
aresolver = dns.resolver.Resolver()
for addr, edns_kwargs in o_list:
if edns_kwargs:
aresolver.use_edns(**edns_kwargs)
aresolver.nameservers = ["8.8.8.8"]
print(list(aresolver.resolve(addr, "A")))