Archive

Archive for the ‘Tools’ Category

Tool Spotlight: HashCalc

January 10, 2011 3 comments

When downloading files such as ISO’s and network gear firmware it is essential to ensure the file is not corrupted. To help with this, download sites will often provide an algorithm hash that was completed against the original file. After downloading the file you will use the same hash method and hopefully have and identical solution.

MD5 and SHA-1 have been the de facto hash methods available where I normally get files (MD5 shouldn’t be used anymore, but that’s another discussion). CRC32 is another one you may see.

If you use Microsoft Windows operating systems there is no build-in way to verify the hash of a downloaded file. I use a utility called HashCalc to perform this simple function. Here is the description off the HashCalc website:

A fast and easy-to-use calculator that allows to compute message digests, checksums and HMACs for files, as well as for text and hex strings. It offers a choice of 13 of the most popular hash and checksum algorithms for calculations.

Since it supports MD5 and SHA1 it covers 95% of what I need. For the few places that use other hash algorithms this program has still worked for me.

Use of the program is simple enough. Here are the steps:

  1. Choose your data file by browsing to it.
  2. Place a check in front of the algorithm to be used.
  3. Click Calculate.
  4. The output will be shown.

A few things to remember when using HashCalc:

  • Don’t choose all possible algorithms. This will work, but may lock up your computer! Performing hash checks is very CPU intensive!
  • While Windows XP is the last supported OS on their website. I can confirm the program works on Win7 64-bit.
  • I have a colleague who uses HashTab. He says this is a great way to add functionality to Windows Explorer. I have not verified that however.

It may seem unnecessary to do this for network gear such as Cisco and Juniper devices (because you can check the hash right on the device). However, you may be in a situation where you download the file and then bring it to a client site with a thumb drive. It would sure be nice to know before you leave the file is good.

 

Categories: Tools Tags:

Use PSCP from Windows to copy files to network devices and Linux servers

January 6, 2011 8 comments

PuTTYI just had a question asking how I get files to/from network devices and Linux servers originating from a Windows machine. For this I use PSCP, which is a part of the PuTTY set of utilities. I use PSCP for two reasons:

  1. FTP is dead, stop using it!!! SCP, SFTP or other similar protocols should be used for transferring files! If your network devices are only setup for FTP or TFTP then get them configured correctly!! (The same goes for telnet, start using SSH!)
  2. Its command line driven. This makes it quick/easy to use and script with.

That said I would recommend downloading and installing the Windows installer version of PuTTY from the download page. This will insure you have all of the binaries and help file available in your start menu, this is not required for operation however. The PuTTY installer does not update the path environment so PSCP can be run from anywhere.  To use PSCP from anywhere in the command line you will either need to use the full path for the executable every time or add the correct path statement.

Here are the steps for adding the path with Win7 (pretty much the same for other versions of Windows):

  1. Go to the Start Menu and right-click on computer.
  2. Choose Properties.
  3. Click “Advanced System Settings”
  4. Click on the “Environmental Variables” button.
  5. In the “System Variables” section double-click on “Path”.
  6. Go to the end of the “Variable Value” blank and semi-colon and the path to where the PuTTY binaries are located. Here is the path statement I added for my 64-bit Win7 machine:
    ;C:\Program Files (x86)\PuTTY
    For a 32-bit Windows OS it would be:
    ;C:\Program Files\PuTTY
  7. Click OK out of all these screens and reboot.

You will now be able to use any of the PuTTY binaries (including PSCP) from the command line without using the full path.

Using PSCP is pretty easy. Just type PSCP without any options to see the usage.

Here is a sample upload via PSCP:

pscp test.file root@testhost:/tmp/

Here is a sample download via PSCP:

pscp root@testhost:/tmp/test.file .

If you’re not comfortable using the command line in Windows for file transfer then I would recommend WinSCP. But then if your working in network devices or Linux I would image you are OK with the command line.

Categories: Tools Tags:

Tool Spotlight: Notepad++

December 31, 2010 1 comment

Notepad++Its time to spotlight another favorite tool. This time its a Windows notepad replacement called Notepad++. It is an open source project, in fact the motto on their website is “free as in ‘free speech’ and ‘free beer'”.  Why would a Network Engineer care about a notepad replacement? Here are just a few reasons:

Network gear config files need to be done with an ASCII editor. Programs such as MS Word can throw in extra characters if you’re not careful. Actually I do all config files with Notepad++, whether it’s for a Cisco Router or a Windows application. (**In UNIX/Linux i use VIM, thats a completely different post).

Notepad++ supports multiple tabs. If you are working on a lot of files this  feature is essential! You can even perform searches on multiple tabs. This is helpful when reviewing logs. You can also use plugins to compare different files (helpful to see what changed on a router config).

This is by far the best scripting tool I’ve used. There is built-in support for almost any scripting language you can think of. I use it mostly for PERL, HTML, and PHP. But recently I decided to learn how to script with PowerShell and it has built-in support for that. Here is an example of a PowerShell script I’m working on right now:

Notepad++ PowerShell example

Notice how nice this is to work with compared to notepad below:

Notepad PowerShell sample

There are a lot of other good Notepad replacements out there, but I happen to like this one the best.

Categories: Microsoft, Tools Tags:

Tool spotlight: WIMI

November 29, 2010 Leave a comment

Today I thought I would put a spotlight on a favorite online tool: WhatIsMyIP.com (WIMI). At its core this site serves a very simple and important task by showing what your public IP is. Simply go to the website and it automatically shows your IP address. If you are behind a proxy server it will also let you know that.

But getting information about your public IP is just the beginning of this sites usefulness. I won’t go through everything but here are some highlights:

  • Information. Every tool/section of the website has some good basic networking information available. Anyone looking to learn more about basic network concepts would do well to browse this site.
  • Internet Speed Test: Find out your true upload and download speeds. I wouldn’t use this just once, try it at different times of the day to see how your ISP’s load differs. An alternate I sometimes use for this is the speakeasy speed test, it’s powered by the same ookla code.
  • IP Address Lookup: This will give the physical location of an IP address, most of the time. Because of where this data is captured it may be incorrect, it really depends on who the ISP is and how they maintain their database.
  • IP WHOIS Lookup: This gives information about an IP address owners. This is not the same as an IP address lookup, in fact the information here will likely be completely different.
  • Host Name Lookup: Basically this does a reverse-IP lookup, so you can see if a DNS host name exists for an IP.
  • Email Trace: This is a not a tool to trace an email, however it has some basic steps to help do this yourself. The IP Address Lookup, IP WHOIS Lookup and Host Name Lookup can all be used when trying to find the source of an internet communication.
  • Forum: I haven’t been in the forums there much, but it does seem to be a very helpful forum with some good information.

As I mentioned this is one of my favorite websites. Its quick, uncluttered, and has great tools/information.

Categories: Networking, Tools Tags: ,

Empty langs.xml in Notepad++

February 15, 2010 1 comment

For the last few weeks I’ve had a problem with Notepad++. Whenever I would open the program I would get an error saying ‘load langs.xml failed’. After clicking OK it open and function fine. My operating system is Windows 7 64bit. The langs.xml file is located in C:\Program Files (x86)\Notepad++.

When I looked at langs.xml it was 0 bytes, there was no information in it. After a Google search I found this site which stated to rebuild the langs.xml with the langs.model.xml file found in the same directory. This fixed the issue. It appears to be an issue affecting 64 bit versions of windows.

As a side note I would recommend all administrators looking at Notepad++. The program is a quite powerful replacement for windows notepad. It is especially helpful for scripting and viewing certain types of logs.

Categories: Microsoft, Tools Tags: