<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://toorcon.techpathways.com/cs/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ProScript and Perl </title><link>http://toorcon.techpathways.com/cs/forums/5/ShowForum.aspx</link><description>Discussions related to the ProScript API and Perl</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>Ping Discovery</title><link>http://toorcon.techpathways.com/cs/forums/thread/61.aspx</link><pubDate>Sat, 09 Sep 2006 00:03:04 GMT</pubDate><guid isPermaLink="false">e7e58421-8683-42c1-b30c-f6943a49c522:61</guid><dc:creator>Chris</dc:creator><slash:comments>0</slash:comments><comments>http://toorcon.techpathways.com/cs/forums/thread/61.aspx</comments><wfw:commentRss>http://toorcon.techpathways.com/cs/forums/commentrss.aspx?SectionID=5&amp;PostID=61</wfw:commentRss><description>&lt;FONT size=2&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;As a followup to my IRAC Scripts post, some people might want a way to automate the creation of the IRACHosts.log file of IP Addresses. Here's some quick code to do just that. &lt;/P&gt;
&lt;P&gt;---------Start Script-----------&lt;/P&gt;
&lt;P&gt;# ======================================================================&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# NAME: PingDiscovery.pl&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# AUTHOR: Original code posted by Steve Kemp on Debian Administration &lt;/P&gt;
&lt;P&gt;# Web Site&lt;/P&gt;
&lt;P&gt;# DATE : 8/14/2006&lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# PURPOSE: Discover "live" systems via ping within a given range. &lt;/P&gt;
&lt;P&gt;#&lt;/P&gt;
&lt;P&gt;# ======================================================================&lt;/P&gt;
&lt;P&gt;#!/usr/bin/perl -w&lt;/P&gt;
&lt;P&gt;use Net::Ping;&lt;/P&gt;
&lt;P&gt;# ============ Change output file for hosts here ==================&lt;/P&gt;
&lt;P&gt;$outfile = 'c:\ProDiscover\ProScript\Output\IRACHosts.log';&lt;/P&gt;
&lt;P&gt;open(OUT,"&amp;gt;$outfile") || PSDiplayText("Could not open $outfile: $!");&lt;/P&gt;
&lt;P&gt;my $LAN = "192.168.75.";&lt;/P&gt;
&lt;P&gt;foreach my $octet (1 .. 255)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;my $pinger = Net::Ping-&amp;gt;new();&lt;/P&gt;
&lt;P&gt;if ( $pinger-&amp;gt;ping( $LAN . $octet ) )&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;print $LAN . $octet . "\n";&lt;/P&gt;
&lt;P&gt;print OUT $LAN . $octet . "\n";&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;$pinger-&amp;gt;close();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;close(OUT);&lt;/P&gt;
&lt;P&gt;---------End Script ------------&lt;/P&gt;
&lt;P&gt;To Do: It would be great of someone could update this to use NMAP's fingerprinting to collect only Windows hosts. &lt;/P&gt;&lt;/FONT&gt;</description></item></channel></rss>