Hostcheck is a simple script to check the availabily of hosts read from a file. It can scan ICMP, UDP and TCP.
The host file must be formatted so that each line is like :
toto:ssh,http titi.org:ssh tata:
For now, the services are limited among : ssh, telnet, ftp, http, oracle, ms-sql-s, vnc-server, ms-wbt-server, microsoft-ds.
Hostcheck is a Perl script based on the following modules : Getopt::Std, Net::Ping, Time::HiRes, Term::ANSIColor and IO::Socket.
You can download these from CPAN or install them from you favorite Linux distro.
sudo hostcheck.pl [-utv] FILE
- without option : simple ICMP ping scan. FILE must be a valid path to a file containing the hosts to check.
- -v : verbose mode (display warnings, mostly about invalid entrie from the file)
- -u : process an UDP ping instead of ICMP
- -t : process the TCP services checks (those present in the file)