DNS access

L

laksh

im looking for some advice regarding DNS lookup using python

is it possible to give parameters like the IP of a DNS server and the
DNS query to a python program and obtain the response from the DNS
server ?

please reply if u hav some idea or interest

laksh
 
C

Chris Lambacher

reverse dns lookup is not really special compared to a regular dns lookup.
you just need to look up a special name:
http://www.dnsstuff.com/info/revdns.htm

to format the ip address properly use something like:
def rev_dns_string(ip_str):
nums = ip_str.split('.').reverse()
nums.extend(('in-addr', 'arpa'))
return '.'.join(nums)

-Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top