| 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 : |
import sys
import trio
import dns.message
import dns.asyncquery
import dns.asyncresolver
async def main():
if len(sys.argv) > 1:
host = sys.argv[0]
else:
host = "www.dnspython.org"
q = dns.message.make_query(host, "A")
r = await dns.asyncquery.udp(q, "8.8.8.8")
print(r)
q = dns.message.make_query(host, "A")
r = await dns.asyncquery.tcp(q, "8.8.8.8")
print(r)
q = dns.message.make_query(host, "A")
r = await dns.asyncquery.tls(q, "8.8.8.8")
print(r)
a = await dns.asyncresolver.resolve(host, "A")
print(a.response)
zn = await dns.asyncresolver.zone_for_name(host)
print(zn)
answer = await dns.asyncresolver.resolve_at("8.8.8.8", "amazon.com", "NS")
print("The amazon.com nameservers are:")
for rr in answer:
print(rr.target)
if __name__ == "__main__":
trio.run(main)