bebemic Posted February 16, 2012 Report Posted February 16, 2012 #!/usr/bin/perl -w#author Boolean #codingworld.ruuse IO::Socket;use threads;use threads::shared;my @threads;my $ports = 65535;my $threads = 10;my $last_port:shared = 1;my $ip = '127.0.0.1';for my $t (1..$threads) { push @threads, threads->create(\&Scan, $t);}foreach my $t (@threads) { $t->join();}sub Scan{ while(1){ my $port = $last_port++; if($port > $ports){ return; } print "Port $port is open\n" if IO::Socket::INET->new(PeerAddr=>"$ip:$port",Proto=>'tcp',Timeout=>1); } } sper sa fie de folos..se poate modifica usor Quote