Updated Reverse DNS Tool
April 25, 2010
A few posts ago I released some rather simplistic code to do reverse DNS lookups. While useful, many improvements could obviously be made. The lookup speeds were pretty dismal (15-25 lookups a second), stemming from my poor handling of timeouts and the fact that I had lazily ignored multithreading because I wanted to get something working fast. In addition, the code was just a giant blob thrown together into a Python file, which probably made a few peoples’ eyes bleed.
Because of these issues, I took the time today to rework the code so that everything is *much* cleaner now (everything broken nicely into classes and such), and is, in addition, fully multithreaded. To do the threading, I adapted a basic thread pooling class shamelessly taken off the interwebs to use Python generators for speed and RAM considerations, and to allow for thread callbacks to be synchronized. As a result, with 35 threads in the thread pool, I am now getting about 400-600 DNS lookups / second. Not bad for 45 minutes of work 😛 . You can grab the new code here.
April 25, 2010 at 2:34 pm
[…] 04/25/10: I just released a much, much better version of this tool here. The code is now multithreaded, and handles timeouts much more intelligently. With these […]
June 8, 2012 at 12:43 pm
Ahhhhhh, WTF? The link is “forbidden” thus I can’t download the code and take a peek at your brilliance 😛
June 10, 2012 at 11:34 am
I moved my blog awhile back; you can find the code here: http://spareclockcycles.org/downloads/code/revdns/revdns_cur.tar.gz