daatdraqq Posted March 24, 2009 Report Share Posted March 24, 2009 #!/usr/bin/perluse IO::Socket;print q{r00ta - teh p0rt scannz0r};sleep 1;print "[-] Insert Ip Address: ";chomp($ip = <STDIN>);if(!$ip) { print "\n[-] Error!!!"; exit }print "\n[-] From Port: ";chomp($from = <STDIN>);if(!$from) { print "\n[-] Error!!!"; exit }print "\n[-] To Port: ";chomp($to = <STDIN>);if(!$to) { print "\n[-] Error!!!"; exit }print "\n[-] Ports Open: ";for($ports = $from; $ports <= $to; $ports++){$xyz = 1;my $conn = IO::Socket::INET->new(Proto => "tcp", PeerPort => $ports, PeerAddr => $ip, Timeout => 1 ) || $xyz++;close($conn);chomp($gethost = getservbyport($ports,"tcp"));if($xyz==1){ print "[$ports]\n" ; }} Quote Link to comment Share on other sites More sharing options...