-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-cpanel.php
More file actions
executable file
·67 lines (58 loc) · 1.76 KB
/
admin-cpanel.php
File metadata and controls
executable file
·67 lines (58 loc) · 1.76 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
<?php
require_once 'files/config.php';
/* Suspend Account
$cp_user = 'gtxso';
$query = "https://us.webhits.ooo:2087/json-api/suspendacct?api.version=1&user=".$cp_user."&reason=Nonpayment";
$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
$header[0] = "Authorization: whm $user_US:$token_US";
curl_setopt($curl,CURLOPT_HTTPHEADER,$header);
curl_setopt($curl, CURLOPT_URL, $query);
$result = curl_exec($curl);
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_status != 200) {
echo "[!] Error: " . $http_status . " returned\n";
} else {
$json = json_decode($result);
$metadata = $json->metadata;
echo "<br><br>";
if ($metadata->result == 1){
// TRUE
echo $cp_user.'Suspended';
}else{
echo $metadata->reason; //error reason
// FALSE
}
}
*/
/* Remove Account
$cp_user = 'gtxso';
$query = "https://us.webhits.ooo:2087/json-api/removecct?api.version=1&user=".$cp_user;
$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
$header[0] = "Authorization: whm $user_US:$token_US";
curl_setopt($curl,CURLOPT_HTTPHEADER,$header);
curl_setopt($curl, CURLOPT_URL, $query);
$result = curl_exec($curl);
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_status != 200) {
echo "[!] Error: " . $http_status . " returned\n";
} else {
$json = json_decode($result);
$metadata = $json->metadata;
echo "<br><br>";
if ($metadata->result == 1){
// TRUE
echo $cp_user.'Suspended';
}else{
echo $metadata->reason; //error reason
// FALSE
}
}
*/
curl_close($curl);
?>