/python-dns-lookup

Fwd and reverse DNS lookups

Primary LanguagePython

DNS lookups using python

Perform forward and reverse DNS lookups using the socket library.

Forward lookups

By default, the script will read a file named fqdn-list.txt. There is a sample file in this repo. The script will perform a forward DNS lookup for each line, and save the results to a file named fwd-results.csv. If socket.gethostbyname() raises an exception, the script will write a line to the file stating that no FQDN was found.

Reverse lookups

The same is true for reverse lookups, except that the script will read from a file named ip-list.txt and save to a file named rsv-results.csv.