After I upgraded netsekure.org to be a blog instead of the old page that I had to manually craft all the HTML for, I looked at the access log of apache to confirm it all works fine. There were some interesting requests to the site and I was curious where the traffic comes from and I found a few sites that provide you with IP-to-location mapping. Interestingly enough for some IPs, the results were quite different between different providers, so I checked each IP on multiple data providers.
Being the command line geek that I am, I didn’t want to go to multiple web sites for each IP I was interested, so I wrote a small python script to query them and display the results on the console. No more browser with multiple tabs and wasting precious milliseconds doing it manually. Feel free to grab the script and let me know if it works/doesn’t work for you. I’ve split the providers in two, since some of them have daily limit on how many queries are possible (dmw, infosniper) and the rest are unlimited, so the unlimited are always used and the rest (blogama, hostip, geoplugin) are optional.