Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 16, 2006

A Tool Harness

Automate your command-line tools with this simple shell script
RSS
View this exclusive article with VIP access -- click here to join |
See More Products / Software Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

I've written a homegrown tool that automates other command-line tools by using input data from a text file. My tool is a simple, one-line shell script that works on Windows, Linux, and Mac OS X with just a few modifications.

How It Works
Let's say you run a firewall report of the top outgoing activity destinations by users of your network. Unfortunately, the firewall doesn't perform the IP address-to-name lookup function and instead simply gives you a list of IP addresses and the number of connections initiated for each address, similar to the information in Table 1.

This report would become much more interesting (and useful) if the IP addresses were resolved to domain names. Then it would reveal at a glance which users were visiting a portal, streaming music, accessing Web mail, or conducting other types of Internet-based activities.

Several common command-line tools such as Whois, dig, and Microsoft's NBTStat help you resolve IP addresses to their owners, DNS names, and Windows NetBIOS names, respectively. It's easy to run Whois for a single address. For example, typing

whois 66.102.7.99 

shows you who owns that IP address. The tool takes a few seconds to run and you need to scroll through the output to find the data you want. . . .

Reader Comments
Very useful in spurring me to examine in more depth the power of scripting to speed up investigations involving large log files. I knew a little bit but the article is good kick in the butt to redouble mastering the various scripting tools.

Thanks

tekgeek January 19, 2007 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Escape From Yesterworld

Kevin points you to the funniest SQL Server website ever! ...


Security Whitepapers The Impact of Messaging and Web Threats

Why SaaS is the Right Solution for Log Management

Protecting (You and) Your Data with Exchange Server 2007

Related Events How IE7 & The New Extended Validation SSL Certificates Impact Your Site

Top 10 Email Security Challenges and Solutions

Introduction to Identity Lifecycle Manager "2"

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing