#!/usr/bin/perl use warnings; use Net::Ping; # code source: http://www.perlmonks.org/?node_id=943892 # More: http://stackoverflow.com/questions/3960595/how-can-i-ping-a-host-with-a-perl-one-liner-with-netping #$| = 1; print "Please type a host to check..n"; $host = <>; if (length($host) < 3) { print "You did not type a host!n"; exit(0); } my @proto = ("tcp", "udp", "icmp", "stream", "syn"); foreach my $pro ( @proto ) { print [...]
↧