Year of Python (YOP) – Week Fifty One

21Dec15

Hello reader!

This week we continue working with the Windows DNS script from last week.  The next step in my process was the ability to search the data.  Now in my case, I’m only interested in two fields, the Remote IP field and the Question Name field.

Mind you this is designed around the script from Week 50, so it’s making assumptions on the table name in the database.

All I’m doing this week with the script is loading the database and then asking the user what they want to look for (IP or DNS name).  Depending on their choice, I run a specific function with the appropriate search term and print the rows with the results.

The one caveat with the DNS search terms, is that you have to end it with a period.  That’s how the data is listed in the database, so if it’s not there you won’t get any results.

Of course for anyone who would like to tailor this script to their needs, you can modify the functions to only return the fields from each row that you are actually concerned with.

Until next week!

https://github.com/CdtDelta/YOP

Advertisements


No Responses Yet to “Year of Python (YOP) – Week Fifty One”

  1. Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s


%d bloggers like this: