Answers for "how to query DNS records using python"

0

how to query DNS records using python

import dns.resolver
name = 'iana.org'
for qtype in 'A', 'AAAA', 'MX', 'NS', 'TXT', 'SOA':
    answer = dns.resolver.query(name,qtype, raise_on_no_answer=False)
    if answer.rrset is not None:
        print(answer.rrset)
Posted by: Guest on October-29-2021
0

how to query DNS records using python

import dns.resolver
name = 'iana.org'
for qtype in 'A', 'AAAA', 'MX', 'NS', 'TXT', 'SOA':
    answer = dns.resolver.query(name,qtype, raise_on_no_answer=False)
    if answer.rrset is not None:
        print(answer.rrset)
Posted by: Guest on October-29-2021

Code answers related to "how to query DNS records using python"

Python Answers by Framework

Browse Popular Code Answers by Language