Thread::Pool::new passed bad attribute name 'HASH(0x1b82874)' at C:\test.pl line 54
EL codigo del script es el siguiente...
Using perl Syntax Highlighting
#!/usr/bin/perl
# [SA]proxycheck, multi cheker proksei
#
# Usage :
# ./sa-proxycheck.pl --input=in.txt --output=out.txt [--url=http://your/proxytest.php] [--threads=100]
#
# Example : ./sa-proxycheck.pl -i rawlist.txt -o goodlist.txt
#
#
# -taking part spisokproxei and :
# -requests to the script currently
# -checks result (you type kodirovano base64)
# maintains output (results)
#
# uses Thread::Pool for fast results
# default URL used to request (there must be some)
our $testurl = "http://url.com/2test.php";
# modules that we use
use strict;
use Getopt::Long;
use Date::Format;
use Thread::Pool;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use MIME::Base64;
# Options commandna line
my $input = "";
my $output = "";
my $threads = 100;
GetOptions (
'input|i=s' => \$input
,'output|o=s' => \$output
,'threads|t=i' => \$threads
,'url|u=s' => \$testurl
);
die ("Use: ./sa-proxycheck.pl --input=in.txt --output=out.txt [--url=http://your/proxytest.php] [--threads=100]\n") if $input eq "" || $output eq "";
# Validating your incoming data
die ("Input file \"$input\" not found!\n") unless -e $input;
# Cleaning output file header installation
open(OUT, ">$output") or die ("Unable to open \"$output\" input file");
my $gentime = time2str("%c", time);
print OUT "# Generated at $gentime by [SA]proxycheck \n";
close OUT;
print "Using $testurl for proxy checking...\n";
print "Starting $input -> $output job with $threads workers:\n";
my %resolved : shared;
my $pool = Thread::Pool->new(
{
workers => $threads,
do => \&do,
monitor => \&monitor,
}
);
open(IN, $input);
while(my $line = <IN>)
{
chomp $line;
$pool->job($line);
}
# check proxy
# IN: 1 proxy to check (iport)
sub do {
my $testproxy = shift;
# build the LAWP request
my $ua = new LWP::UserAgent;
$ua->timeout(10);
$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4");
$ua->proxy(['http'] => 'http://' . $testproxy);
my $verify = time;
my $req = POST $testurl, [ check => "$verify"];
my $res = $ua->request($req);
if ($res->is_success)
{
my $content = $res->content;
(my $security, my $type) = split("\t", decode_base64($content));
$security = decode_base64($security);
$type = decode_base64($type);
if($verify == $security && $type eq "strong")
{
print "$testproxy\tFOUND PROXY\n";
return $testproxy;
}
else {
print "$testproxy\tsecurity failed: $verify != $security or bad type $type\n";
return 0;
}
}
else
{
print "$testproxy\tquery failed\n";
return 0;
}
} #do
#--------------------------------------------------------------------
# IN: 1 working proxy (iport)
sub monitor {
if($_[0])
{
open(OUT, ">>$output");
print OUT $_[0] . "\n";
close OUT;
}
} #monitor
# [SA]proxycheck, multi cheker proksei
#
# Usage :
# ./sa-proxycheck.pl --input=in.txt --output=out.txt [--url=http://your/proxytest.php] [--threads=100]
#
# Example : ./sa-proxycheck.pl -i rawlist.txt -o goodlist.txt
#
#
# -taking part spisokproxei and :
# -requests to the script currently
# -checks result (you type kodirovano base64)
# maintains output (results)
#
# uses Thread::Pool for fast results
# default URL used to request (there must be some)
our $testurl = "http://url.com/2test.php";
# modules that we use
use strict;
use Getopt::Long;
use Date::Format;
use Thread::Pool;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use MIME::Base64;
# Options commandna line
my $input = "";
my $output = "";
my $threads = 100;
GetOptions (
'input|i=s' => \$input
,'output|o=s' => \$output
,'threads|t=i' => \$threads
,'url|u=s' => \$testurl
);
die ("Use: ./sa-proxycheck.pl --input=in.txt --output=out.txt [--url=http://your/proxytest.php] [--threads=100]\n") if $input eq "" || $output eq "";
# Validating your incoming data
die ("Input file \"$input\" not found!\n") unless -e $input;
# Cleaning output file header installation
open(OUT, ">$output") or die ("Unable to open \"$output\" input file");
my $gentime = time2str("%c", time);
print OUT "# Generated at $gentime by [SA]proxycheck \n";
close OUT;
print "Using $testurl for proxy checking...\n";
print "Starting $input -> $output job with $threads workers:\n";
my %resolved : shared;
my $pool = Thread::Pool->new(
{
workers => $threads,
do => \&do,
monitor => \&monitor,
}
);
open(IN, $input);
while(my $line = <IN>)
{
chomp $line;
$pool->job($line);
}
# check proxy
# IN: 1 proxy to check (iport)
sub do {
my $testproxy = shift;
# build the LAWP request
my $ua = new LWP::UserAgent;
$ua->timeout(10);
$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4");
$ua->proxy(['http'] => 'http://' . $testproxy);
my $verify = time;
my $req = POST $testurl, [ check => "$verify"];
my $res = $ua->request($req);
if ($res->is_success)
{
my $content = $res->content;
(my $security, my $type) = split("\t", decode_base64($content));
$security = decode_base64($security);
$type = decode_base64($type);
if($verify == $security && $type eq "strong")
{
print "$testproxy\tFOUND PROXY\n";
return $testproxy;
}
else {
print "$testproxy\tsecurity failed: $verify != $security or bad type $type\n";
return 0;
}
}
else
{
print "$testproxy\tquery failed\n";
return 0;
}
} #do
#--------------------------------------------------------------------
# IN: 1 working proxy (iport)
sub monitor {
if($_[0])
{
open(OUT, ">>$output");
print OUT $_[0] . "\n";
close OUT;
}
} #monitor
Coloreado en 0.005 segundos, usando GeSHi 1.0.8.4
Gracias de antemano.