Thread PortScanner
(4 answers)
Opened by Gast at 2008-07-29 00:15
Hallo,
ich wollte mir einen kleinen Portscanner basteln, leider klappt das nicht... Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 use IO::Socket; use Net::IP; my $port = 80; my $start_ip = "88.198.240.123"; my $end_ip = "88.198.255.254"; my $ip_string = $start_ip." - ".$end_ip; my $ip = new Net::IP ($ip_string) or die; do { my $temp_ip = $ip->ip(); print "Info: Connecting to... [$temp_ip]\n"; my $socket = IO::Socket::INET->new( PeerAddr => $temp_ip, PeerPort => $port, proto => 'tcp', Timeout => 0 ); unless($socket) { print STDERR "Info: ... FAILED! Can't bind: $@\n"; } $socket->close(); print "Info: ... OK!\n"; } while (++$ip); ich bekomme die Meldung: Code: (dl
)
1 Info: Connecting to... [88.198.240.123] |