Programming a client for the WHOIS protocol

I have a little task that involves programmatically determining whether DNS servers are set correctly for a domain. Since this project is written in Python, I first set out to see if there were any “whois” clients already available for Python. I eventually found rwhois.py, which is a whois client with recursive ability. I noticed it hasn’t changed since 2003, but thought that if it works, that shouldn’t be much of a problem.

My first run of the program resulted in an error. The client successfully found the registrar information for my domain, but failed to parse and display it. There was a “NoParser for: whois.godaddy.com” exception. I set out to analyze the rwhois.py client and the whois protocol and see if I couldn’t either fix it or come up with something for a replacement.

Continue reading “Programming a client for the WHOIS protocol”