CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Why, sometime check 100ip's sometime 50ip's

 



kun
New User

Feb 28, 2007, 3:53 PM

Post #1 of 1 (263 views)
Why, sometime check 100ip's sometime 50ip's Can't Post

Hi!

I wrote script

########

Code
use IO::Socket::Socks; 

open(FILE,"lista.txt") or die "I can;t open : $!";
while(<FILE>){
chomp;
my ($ip, $port)=split(/:/,$_);
print $ip," ",$port," $. \n";
my $remote;
eval{
$SIG{ALRM} = sub { die "killuj" };
alarm(1);
$remote = IO::Socket::Socks->new(ProxyAddr=> $ip,
ProxyPort=> $port,
ConnectAddr=>"xx.xx.xx.xx",
ConnectPort=>"25"
) or next;

print "Connect :) ";
};
if ($@ =~ /killuj/ && $remote){$remote->close; print "zabity";}
}

close FILE;

########

My question is: why my script sometime check 100ip's sometime 50 ip (my list has 400ip's).
My variable $remote is ok (socket is good closed?)? What's wrong ?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives