Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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)
Comment

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)
Comment

PREVIOUS NEXT
Code Example
Python :: how to get var value by name godot 
Python :: custom dataset pytorch 
Python :: discord embed python 
Python :: bitwise operators in python 
Python :: pathlib check is file 
Python :: iterrows pd 
Python :: h2o ai python 
Python :: numpy primes 
Python :: us states and capitals dictionary 
Python :: python dict add item 
Python :: binary tree python implementation 
Python :: fonction nombre premier python 
Python :: mean bias error 
Python :: python csv find specific string 
Python :: list to one hot encoding pandas 
Python :: importing time and sleep. python 
Python :: python get dpi of image 
Python :: Tuple: Create tuple 
Python :: PySimple list of elements 
Python :: what is admin.tabularinline django 
Python :: print with color python 
Python :: fixed size list in python 
Python :: set comprehension 
Python :: pubg python 
Python :: Python NumPy stack Function Example with 2d array 
Python :: whitelist the ip address django 
Python :: sns swarm plot 
Python :: Palindrome in Python Using while loop for string 
Python :: python split range into n groups 
Python :: max in python 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =