Archives For February 2015

VRFBackupTool shares the same broken function as VRFSearchAndBackup, so I decided I would update this one as well.

You can find the most recent version on it’s GitHub Repository.

As you might have noticed form this week’s blog posts, I enjoy writing code to automate tedious or time consuming tasks.  Well, maybe it might be a stretch to say I enjoy it — but I certainly reap the benefit of putting in the hard work to automate tasks that I otherwise hate performing.  I do, however, enjoy publishing much of this code on the Internet in hopes that others will find it useful and I occasionally hear from them stating such.

In a past life, as a Network Engineer, I wrote a small application which automates the ability to search a Cisco router for a VRF VPN profile and back it up to disk.  (If you’re making changes to your Cisco routers and you don’t back up your configurations before you change them, then you obviously haven’t broken one yet.)  I received a lot of feedback from other people who found this tool to be useful and use it regularly.  I also recently received word that it doesn’t work under Cisco IOS 15.4.

That sucks.

Specifically, it blows up right about here:

[code language=”text”]

VRFSearchAndBackup.py v1.0.1 (2014-03-17)
—————————————–

–> Index found and appears up to date.

Enter the VRF Name or IP Address you are searching for: USG-10195

+——————–+——————–+——————–+
| VRF NAME | REMOTE IP ADDRESS | LOCAL IP ADDRESS |
+——————–+——————–+——————–+
| ABC-12345 | 192.168.1.1 | 192.168.2.1 |
| ABC-12345 | 192.168.1.1 | 192.168.2.1 |
+——————–+——————–+——————–+

Do you want to back up this configuration now? [Y/n]

–> Logging into 192.168.2.1…
–> Backing up ABC-12345 …
Traceback (most recent call last):
File "<string>", line 534, in <module>
File "<string>", line 413, in searchIndex
File "<string>", line 176, in backupVRF
AttributeError: ‘NoneType’ object has no attribute ‘group’

C:\Applications>[/code]

Continue Reading…

One of the least glamorous parts of network security is capturing information on Internet hosts that exhibit malicious intent.  Here is a script that I’ve created to help automate the process of collecting AlienVault’s Open Threat Exchange (OTX) reports:

[code language=”bash”]#!/usr/bin/sh
#
# downloadOTX.sh
#
# This script uses AlienVault’s Open Threat Exchange (OTX) to download a PDF
# containing the IP reputation of the IP Addresses provided.
#
# USAGE:
# $ ./downloadOTX.sh 1.2.3.4
# $ ./downloadOTX.sh 1.2.3.4 1.2.3.5 1.2.3.6 etc.
#

# Set path to save files:
path=/Downloads/

# Set filename prefix and/or suffix:
prefix=
suffix=\_otx.pdf

for args in "$@"
do
wget http://www.alienvault.com/apps/api/threat/pdf/?ip=$args -O $path$prefix$args$suffix
done[/code]

Continue Reading…

One of the least glamorous parts of network security is capturing information on Internet hosts that exhibit malicious intent.  Here is a script that I’ve created to help automate the process of collecting WHOIS information:

[code language=”bash”]#!/usr/bin/sh
#
# downloadWHOIS.sh
#
# This script uses native whois command to return the WHOIS information
# of the IP Addresses provided.
#
# USAGE:
# $ ./downloadWHOIS.sh 1.2.3.4
# $ ./downloadWHOIS.sh 1.2.3.4 1.2.3.5 1.2.3.6 etc.
#

# Set path to save files:
path=/Downloads/

# Set filename prefix and/or suffix:
prefix=
suffix=\_whois.txt

for args in "$@"
do
whois $args > $path$prefix$args$suffix
done
[/code]

Continue Reading…

2014 Blog Summary

February 3, 2015 — Leave a comment

Regular readers, assuming I have any left, may have noticed activity around here has been pretty quiet the past few months.  Major work projects with deadlines in November last year sucked up all my available time outside family life. In a very short timeframe I was able to successfully integrate both a new network performance monitoring tool and an intrusion detection system into our network.  Now that those things have (mostly) settled down a bit, I have more time to continue exploring activities that interest me and the margin to blog about them.

In 2014 I began capturing basic metrics on the blog and I thought it would be fun to look back at the year to see what was hot and what was not.  In the approximately 86 blog posts I made in 2014, one post practically dominated the majority of my inbound traffic.  I’m not a paid subscriber to StatCounter, so I can’t provide you with a detailed history, but if the last 9 days are any indication, you can see just how popular my How To Rip P90X3 DVDs With Handbrake post was:

blog_popular_pages

 

Thanks to everyone participating in the comments section on that post.  I never imagined there would be so much interest in this topic when I wrote my guide. Continue Reading…