Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  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. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Top Viewed ArticlesView all articles
2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Security Whitepapers Reducing the Costs and Risks of Branch Office Data Protection

Solving Desktop Management Challenges in Healthcare

Solving Desktop Management Challenges in Education

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Cutting Costs with Client Management

7 Ways To Get More From Your SharePoint Deployment Now

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 Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


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 DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement