Monday, 1 January 2007

PortScanner

#/usr/bin/perl -w
use IO::Socket;
print "\n";
print "# Perl-Port Scanner v 1.0 #\n";
print "\n";
print "Host:http://";
chomp($host=);
print "Scan until port:";
chomp($port=);
while ($i<$port) {
$i++;
my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>"$host",
PeerPort=>$i) && print "[Found]Port:".$i."";
print "[-]Port:".$i."\n";
}

No comments: