$ perl -MIO::Socket::INET -e ‘{ print “PORT 22 is open\n” if ( IO::Socket::INET->new(PeerAddr=>”127.0.0.1:22″,Proto=>’tcp’,Timeout=>1)) ;}’

Simple perl port scanner with a 1s time-out.

For those times when netcat is not available and for people who are tired of reading the Telnet message: “Escape character is ‘^]’.”

View this command to comment, vote or add to favourites
View all commands by zlemini

commandlinefu.com

by David Winterbottom (codeinthehole.com)


Tags: