Year of Python (YOP) – Week Forty Three


Hello Reader!

This week I’m changing gears a bit.  Recently I’ve been doing a lot of checking on IP addresses that show up in logs, memory dumps, alerts, etc.  And I decided it would nice to have a simple script that can just pull that information for me automatically without typing multiple commands over and over.

This script takes an IP address and a DNS server as arguments, does a DNS lookup on the IP, then pulls the whois information, and finally will pull down the main webpage from the site (I’m assuming here there’s a webserver on the other end).  The webpage gets saved in the directory the script is run from.

This script does require the following modules in order to run:

ipwhois and pycurl

But otherwise that’s it!

Until next week!


No Responses Yet to “Year of Python (YOP) – Week Forty Three”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: