Re: Script Required to Check a range of IP's




Timothy Johnson wrote:
You've gotten many good suggestions, but the main problem is that you
are doing a TCP ping, and I'm pretty sure you are expecting the results
to match your ICMP ping.

From the Perldoc:
"You may choose one of six different protocols to use for the ping. The
"tcp" protocol is the default. Note that a live remote host may still
fail to be pingable by one or more of these protocols. For example,
www.microsoft.com is generally alive but not "icmp" pingable."


You should change this line

my $p = Net::Ping->new();

to

my $p = Net::Ping->new("icmp");


and that will make your results match your "manual" ping results.

but the script must then be run as root or suid'd...

-jp

.



Relevant Pages

  • Re: Security Test
    ... Stealth except one and that is ICMP Ping ... Can you tell me how to close that please, is it in my Antivirus (Avast) ... ICMP is Internet Control Message Protocol. ...
    (uk.people.silversurfers)
  • RE: XP-SP2 "Feature"
    ... this is because windows network printing uses an ICMP ping ... Don't you need Ping enabled on the printer then and not the workstation? ...
    (Focus-Microsoft)
  • Re: Ping of Death from a friend?
    ... Interesting thing is that the "Ping of Death" does not necessarily have ... It's just the name given to the attack because it ... was mostly used in attacks involving simple icmp ping packets because it ... Peter Fleischer wrote: ...
    (comp.security.firewalls)
  • Re: publishing terminal server
    ... You need allow in IP Packet Filters rule "ICMP Ping query". ... You can't ping ISA Server from internet or trying ping Terminal ...
    (microsoft.public.isaserver)
  • Re: failed shields up test
    ... Try to ping one - you'll probably get a response, ... Now, plug the cable back in, and fire up that packet sniffer on "this" ... protocols that can be found in an IP packet (see figure 3.1 in RFC0791 ...
    (alt.os.linux.suse)