Guest User

Untitled

a guest
Jan 28th, 2022
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.14 KB | None | 0 0
  1. #!/usr/local/RCBIN/bin/php
  2. <?php
  3. /**
  4. *
  5. * @ This file is created by http://DeZender.Net
  6. * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
  7. *
  8. * @ Version : 5.0.0.0
  9. * @ Author : DeZender
  10. * @ Release on : 14.12.2021
  11. * @ Official site : http://DeZender.Net
  12. *
  13. */
  14.  
  15. function clean_firewall()
  16. {
  17. exec('iptables -A OUTPUT -j ACCEPT > /dev/null 2>&1');
  18. exec('iptables -I INPUT -j ACCEPT > /dev/null 2>&1');
  19. exec('iptables -I OUTPUT -j ACCEPT > /dev/null 2>&1');
  20. exec('iptables -P INPUT ACCEPT > /dev/null 2>&1');
  21. exec('iptables -P FORWARD ACCEPT > /dev/null 2>&1');
  22. exec('iptables -P OUTPUT ACCEPT > /dev/null 2>&1');
  23. exec('iptables -t nat -F > /dev/null 2>&1');
  24. exec('iptables -t mangle -F > /dev/null 2>&1');
  25. exec('iptables -F > /dev/null 2>&1');
  26. exec('iptables -X > /dev/null 2>&1');
  27. }
  28.  
  29. function uninstall()
  30. {
  31. clean_firewall();
  32. exec('rm -rf /etc/cron.d/licensecp 1> /dev/null');
  33. exec('rm -rf /etc/cron.d/gb* 1> /dev/null');
  34. exec('rm -rf /usr/bin/GbCpanel 1> /dev/null');
  35. exec('rm -rf /usr/bin/gblicensecp 1> /dev/null');
  36. exec('rm -rf /usr/bin/gblicensecp_update 1> /dev/null');
  37. exec('chattr -ai /usr/local/cpanel/cpkeyclt 1> /dev/null');
  38. exec('echo \'\' > /usr/local/cpanel/cpkeyclt 1> /dev/null');
  39. exec('rm -rf /etc/cron.d/licensecp 1> /dev/null');
  40. exec('rm -rf /usr/bin/gblicensecp* 1> /dev/null');
  41. exec('rm -rf /usr/bin/gblicensecp 1> /dev/null');
  42. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  43. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  44. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  45. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  46. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  47. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  48. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  49. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  50. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  51. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  52. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  53. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  54. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  55. exec('chattr -i /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  56. exec('chattr -a /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  57. exec('rm -rf /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  58. exec('touch /usr/local/cpanel/cpanel.lisc');
  59. echo "\x1b" . '[36m Please Wait... ' . "\x1b" . '[0m ' . "\n";
  60. echo "\x1b" . '[36m WHM/CPanel Upgrade... ' . "\x1b" . '[0m ' . "\n";
  61. echo "\x1b" . '[36m Will Take SomeTime... ' . "\x1b" . '[0m ' . "\n";
  62. sleep(2);
  63. echo "\n";
  64. echo "\n";
  65. real_execute('/scripts/upcp --force');
  66. echo "\n";
  67. echo "\n";
  68. echo "\n";
  69. echo "\n";
  70. echo "\x1b" . '[36m Done... ' . "\x1b" . '[0m ' . "\n";
  71. return true;
  72. }
  73.  
  74. function maximum_users()
  75. {
  76. exec('whmapi1 get_maximum_users > /usr/local/GB/.max_users');
  77. $filech = file_get_contents('/usr/local/GB/.max_users');
  78. $postt = strpos($filech, 'maximum_users: 30');
  79.  
  80. if ($postt) {
  81. exec('/usr/bin/licensescc > /dev/null 2>&1');
  82. }
  83.  
  84. exec('rm -rf /usr/local/GB/.max_users &> /dev/null');
  85. }
  86.  
  87. function kill_licensecp()
  88. {
  89. $current_process = getmypid();
  90. $killprocess = exec_output(' ps aux | grep gblicensecp | grep -v grep | awk \'{print $2 }\'');
  91. $killprocess = explode("\r\n", $killprocess);
  92.  
  93. foreach ($killprocess as $proc) {
  94. if ($proc != $current_process) {
  95. system('kill -9 ' . $proc . ' &> /dev/null');
  96. }
  97. }
  98. }
  99.  
  100. function is_running()
  101. {
  102. $running = false;
  103.  
  104. if (file_exists('/usr/bin/pid/running.pid')) {
  105. $running_date = exec_output('expr $(expr $(date +%s) - $(stat /usr/bin/pid/running.pid -c %Y)) / 60');
  106. $running_date = (int) $running_date;
  107.  
  108. if (10 < $running_date) {
  109. system('mkdir -p "/usr/bin/pid" &> /dev/null');
  110. system('touch "/usr/bin/pid/running.pid" &> /dev/null');
  111. kill_licensecp();
  112. }
  113. else {
  114. $running = true;
  115. }
  116. }
  117. else {
  118. system('mkdir -p "/usr/bin/pid" &> /dev/null');
  119. system('touch "/usr/bin/pid/running.pid" &> /dev/null');
  120. $running = false;
  121. }
  122.  
  123. return $running;
  124. }
  125.  
  126. function send_request_verify($ip)
  127. {
  128. $ch = curl_init();
  129. curl_setopt($ch, CURLOPT_URL, 'https://api.licenses4host.com/cpanel/verify/' . $ip . '?user=es');
  130. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  131. $response = curl_exec($ch);
  132. curl_close($ch);
  133. return trim($response);
  134. }
  135.  
  136. function exec_output($cmd)
  137. {
  138. exec($cmd, $output, $return_var);
  139.  
  140. if (1 < count($output)) {
  141. return join("\r\n", $output);
  142. }
  143.  
  144. return $output[0];
  145. }
  146.  
  147. function firewall_traffic_drop()
  148. {
  149. $firewall = exec_output(' iptables --list OUTPUT --line-number ');
  150.  
  151. if (!preg_match('/DROP all -- auth2.cpanel.net/', $firewall)) {
  152. system('iptables -A OUTPUT -s auth2.cpanel.net -j DROP');
  153. }
  154.  
  155. if (!preg_match('/DROP all -- auth5.cpanel.net/', $firewall)) {
  156. system('iptables -A OUTPUT -s auth5.cpanel.net -j DROP');
  157. }
  158.  
  159. if (!preg_match('/DROP all -- auth10.cpanel.net/', $firewall)) {
  160. system('iptables -A OUTPUT -s auth10.cpanel.net -j DROP');
  161. }
  162.  
  163. if (!preg_match('/DROP all -- auth7.cpanel.net/', $firewall)) {
  164. system('iptables -A OUTPUT -s auth7.cpanel.net -j DROP');
  165. }
  166.  
  167. if (!preg_match('/DROP all -- auth3.cpanel.net/', $firewall)) {
  168. system('iptables -A OUTPUT -s auth3.cpanel.net -j DROP');
  169. }
  170.  
  171. if (!preg_match('/DROP all -- auth9.cpanel.net/', $firewall)) {
  172. system('iptables -A OUTPUT -s auth9.cpanel.net -j DROP');
  173. }
  174.  
  175. if (!preg_match('/DROP all -- auth9.cpanel.net/', $firewall)) {
  176. system('iptables -A OUTPUT -s auth9.cpanel.net -j DROP');
  177. }
  178.  
  179. $firewall = exec_output(' iptables --list INPUT --line-number ');
  180.  
  181. if (!preg_match('/DROP all -- auth2.cpanel.net/', $firewall)) {
  182. system('iptables -A INPUT -s auth2.cpanel.net -j DROP');
  183. }
  184.  
  185. if (!preg_match('/DROP all -- auth5.cpanel.net/', $firewall)) {
  186. system('iptables -A INPUT -s auth5.cpanel.net -j DROP');
  187. }
  188.  
  189. if (!preg_match('/DROP all -- auth10.cpanel.net/', $firewall)) {
  190. system('iptables -A INPUT -s auth10.cpanel.net -j DROP');
  191. }
  192.  
  193. if (!preg_match('/DROP all -- auth7.cpanel.net/', $firewall)) {
  194. system('iptables -A INPUT -s auth7.cpanel.net -j DROP');
  195. }
  196.  
  197. if (!preg_match('/DROP all -- auth3.cpanel.net/', $firewall)) {
  198. system('iptables -A INPUT -s auth3.cpanel.net -j DROP');
  199. }
  200.  
  201. if (!preg_match('/DROP all -- auth9.cpanel.net/', $firewall)) {
  202. system('iptables -A INPUT -s auth9.cpanel.net -j DROP');
  203. }
  204.  
  205. system('chmod -x /usr/local/cpanel/cpkeyclt &> /dev/null');
  206. }
  207.  
  208. function get_number_rule($rule = 'INPUT')
  209. {
  210. while (true) {
  211. $firewall_numbers = exec_output('/sbin/iptables --list ' . $rule . ' --line-numbers | grep -E \'*.cpanel.net\'');
  212. $firewall_numbers = explode("\r\n", $firewall_numbers)[0];
  213.  
  214. if ($firewall_numbers == '') {
  215. break;
  216. }
  217.  
  218. yield $firewall_numbers;
  219. }
  220.  
  221. yield false;
  222. }
  223.  
  224. function firewall_traffic_accept()
  225. {
  226. foreach (get_number_rule('OUTPUT') as $data_1) {
  227. $currentID = exec_output(' echo \'' . $data_1 . '\' | head -n1 | awk \'{print $1;}\' ');
  228.  
  229. if ($currentID != '') {
  230. system('/sbin/iptables -D OUTPUT ' . $currentID);
  231. }
  232. }
  233.  
  234. foreach (get_number_rule() as $data_1) {
  235. $currentID = exec_output(' echo \'' . $data_1 . '\' | head -n1 | awk \'{print $1;}\' ');
  236.  
  237. if ($currentID != '') {
  238. system('/sbin/iptables -D INPUT ' . $currentID);
  239. }
  240. }
  241. }
  242.  
  243. function firewall_accept($force = false)
  244. {
  245. firewall_traffic_accept();
  246.  
  247. if (file_exists('/usr/sbin/csf')) {
  248. if (file_exists('/etc/csf/csf.conf')) {
  249. csf_ports();
  250. }
  251. }
  252. }
  253.  
  254. function firewall_drop()
  255. {
  256. global $firewall_stop;
  257. global $firewall_stop_1;
  258. firewall_traffic_drop();
  259. }
  260.  
  261. function check_license_expire()
  262. {
  263. global $key;
  264. system('mkdir -p /usr/local/GB > /dev/null 2>&1');
  265. $private = '-----BEGIN PRIVATE KEY-----' . "\r\n" . 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC5Hq/0a7g3fR9Y' . "\r\n" . '7IteOpM9FIgocmBa/V7TkURXdT+5y3OpVED/FGyQ+WoBWi5bym6CgTlp5bM6QvTe' . "\r\n" . 'QAoVNvDyRjxB4dENBhls/Gr9B1JBcuG6pm1Ruizhu8NsfL5hiCbyZGzSu7L7LKaz' . "\r\n" . '457RoJ01pH7p8IVKxJdW1vNsTiCLgTLgjePkO/hTQJMwO6MvXnpQ3ViI8kECThVS' . "\r\n" . 'lkhrz4UveenmJXBaop038MW2Y0VtVWFaDBdJ+HFN6tueKhIEGbgkB//TyGBuPAS4' . "\r\n" . 'XDe7MQVzg8OUz8NAFrWcJBmVUep8qiDJwVm2m5AvMiUHN4SVyk5wgVZ6XtGeiuOZ' . "\r\n" . 'MUfCQeM3AgMBAAECggEATiIKqAIzLZBtA65LIIlejeA1m8SysJTSSj+89aDyNawO' . "\r\n" . 'dECwcjkfnYz31fxHJszpGcILBoxBumx6R7gFyXB3//nvAuuZvYJ+hsZ/La7CZAdm' . "\r\n" . 'CM6nw1/uA5SpZge8nxPFRHdoiwVYBLWS4shGxzmgQPzd6EVxLN6O9cMh2OucxuQY' . "\r\n" . 'G8HgZ8akklpG8GRiYCesDdHVNycSbm+KrpkMgFVsVbZ2U3kKoti9D3XS24a5vSD0' . "\r\n" . 'kmbkftljpiMZOnHlGGLEIfWFO8ZeS27CvTK1mYgJEibdSTHAsqbH11lw7AUtkIdD' . "\r\n" . 'JGldC+7RElS0bs5X08Vmt/IOeC/MBUa5mWgbUGsLmQKBgQDlk3T0qVLwjduNNFBX' . "\r\n" . 'OxmOI/yQPK5r3xwd6PJx4wxjFzBqq4U3Ew7Jxim2U3BrphliyZ81LwxfTVoJIN1i' . "\r\n" . 'gphkBx3vt3FF9TwFIYh4iQK9U4LCi5aJ6LenjK/UrRz9L9+A3+nabrBCNyKgkdwH' . "\r\n" . 'UaLrPutV7XxNkhdKhI3/bI0ZfQKBgQDObVBZ86DnVSlo6a8Yfe0g6hrdqumJSe+8' . "\r\n" . 'vDlZor3QjtELQ/9o0rZWnyVt8M/MxsZBmBpD/yiTBR8YM56+bBTUF6RooZPcedK7' . "\r\n" . 'JkYobA4bKbaB2sN3LcjaO0+Bk/VZfhgQQwR0CvCZLEnCv5yQYGXRCXfPDYaMQc72' . "\r\n" . 'rJ2JsCatwwKBgCiM+0OcBQJojDdM3kQKNGFfCeWQUl7LcfP2iZyENlPqbKrq0QUB' . "\r\n" . 'YMNTNVr3MgxRsno4kt6aCN1slFK4c2JLHw/MEgWdqWxp/MgLPEfOK6W1cotajKSf' . "\r\n" . 'bpEx0H0Idu5h3mCtLGlg09FeW8dw/CRuzxAudPMgl6w7+dE3yL0tN18hAoGABYCu' . "\r\n" . 'eqde66u+fdh03W9F6fGzo6MRtKIu7NYLpVMMQkn8UpOOdGnhiG+XnNWlhGzsDgWS' . "\r\n" . '9asQltK1IH0Hx0W0TG8Q5+UevurUbj638g3nVlwHTHDbcwraZs7b8LVT/f25gH14' . "\r\n" . '2esMvNiMYs+eyc54CFl7Qx62Lnj2nma9kFUMwucCgYEAsE/NPUBp/lLuGqSR+quj' . "\r\n" . 'sgdTIbttscOF5K+CYThJjBIAI4sMHC1qxgDgf0BAhUiL2NciQ6aIniSCkIoF5bpM' . "\r\n" . 'V7YU+L/ugiOfGVhFsji4X8E00dkqWHUZ1EaDCccoMV/gKKAbnsofUF6w4U/mk3bH' . "\r\n" . 'p2uA5sF5fX+kO3sqKGwfgoI=' . "\r\n" . '-----END PRIVATE KEY-----';
  266.  
  267. if (!file_exists('/usr/local/GB/.licensekeycp2')) {
  268. exec('wget -O /usr/local/GB/.licensekeycp2 https://api.licenses4host.com/api/' . $key . '/getlicense > /dev/null 2>&1');
  269. $getdata = file_get_contents('/usr/local/GB/.licensekeycp2');
  270. $file = json_decode($getdata, true);
  271. $data = base64_decode($file['sig']);
  272. $decrypted = openssl_private_decrypt($data, $decrypted_1, $private);
  273. $json = json_decode($decrypted_1, true);
  274. $valid = $json['second'];
  275. $validdate = date('m/d/Y h:i:s a', time());
  276. $valid2 = strtotime($validdate);
  277. }
  278. else {
  279. $getdata = file_get_contents('/usr/local/GB/.licensekeycp2');
  280. $file = json_decode($getdata, true);
  281. $data = base64_decode($file['sig']);
  282. $decrypted = openssl_private_decrypt($data, $decrypted_1, $private);
  283. $json = json_decode($decrypted_1, true);
  284. $valid = $json['second'];
  285. $validdate = date('m/d/Y h:i:s a', time());
  286. $valid2 = strtotime($validdate);
  287. }
  288.  
  289. if (0 <= $valid2 - $valid) {
  290. exec('wget -O /usr/local/GB/.licensekeycp2 https://api.licenses4host.com/api/' . $key . '/getlicense > /dev/null 2>&1');
  291. $getdata = file_get_contents('/usr/local/GB/.licensekeycp2');
  292. $file = json_decode($getdata, true);
  293. $data = base64_decode($file['sig']);
  294. $decrypted = openssl_private_decrypt($data, $decrypted_1, $private);
  295. $json = json_decode($decrypted_1, true);
  296. $valid = $json['second'];
  297. $validdate = date('m/d/Y h:i:s a', time());
  298. $valid2 = strtotime($validdate);
  299.  
  300. if (0 <= $valid2 - $valid) {
  301. exec('chmod +x /usr/local/cpanel/cpsrvd > /dev/null 2>&1');
  302. exec('chmod +x /usr/local/cpanel/cpkeyclt > /dev/null 2>&1');
  303. exec('umount /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  304. exec('umount /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  305. exec('chattr -i /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  306. exec('chattr -i /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  307. exec('chattr -a /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  308. exec('chattr -a /usr/local/cpanel/cpsanitycheck.so > /dev/null 2>&1');
  309. exec('rm -rf /usr/local/cpanel/.lgbt > /dev/null 2>&1');
  310.  
  311. if (file_exists('cp /usr/local/cpanel/scripts/restartsrv_cpsrvd1')) {
  312. exec('yes 2>/dev/null | cp /usr/local/cpanel/scripts/restartsrv_cpsrvd1 /usr/local/cpanel/scripts/restartsrv_cpsrvd');
  313. }
  314.  
  315. exec('chmod +x /usr/local/cpanel/scripts/restartsrv_cpsrvd');
  316. exec('chattr -a /usr/local/cpanel/cpkeyclt 2> /dev/null');
  317. exec('rm -rf /usr/local/cpanel/cpsanitycheck.*');
  318. exec('rm -rf /usr/local/cpanel/cpane*.lis*');
  319. return true;
  320. }
  321. }
  322.  
  323. return false;
  324. }
  325.  
  326. function csf_ports()
  327. {
  328. $file22 = file_get_contents('/etc/csf/csf.conf');
  329. $pos = strpos($file22, 'TCP_OUT = "1:65535"');
  330.  
  331. if ($pos === false) {
  332. exec('sed -i \'/TCP_OUT =/c\\TCP_OUT = "1:65535"\' /etc/csf/csf.conf');
  333. exec('csf -r > /dev/null 2>&1');
  334. }
  335.  
  336. $file22 = file_get_contents('/etc/csf/csf.conf');
  337. $pos = strpos($file22, 'TCP_IN = "1:65535"');
  338.  
  339. if ($pos === false) {
  340. exec('sed -i \'/TCP_IN =/c\\TCP_IN = "1:65535"\' /etc/csf/csf.conf');
  341. exec('csf -r > /dev/null 2>&1');
  342. }
  343.  
  344. $file22 = file_get_contents('/etc/csf/csf.conf');
  345. $pos = strpos($file22, 'UDP_IN = "1:65535"');
  346.  
  347. if ($pos === false) {
  348. exec('sed -i \'/UDP_IN =/c\\UDP_IN = "1:65535"\' /etc/csf/csf.conf');
  349. exec('csf -r > /dev/null 2>&1');
  350. }
  351.  
  352. $file22 = file_get_contents('/etc/csf/csf.conf');
  353. $pos = strpos($file22, 'TESTING = "0"');
  354.  
  355. if ($pos === false) {
  356. exec('sed -i \'/TESTING =/c\\TESTING = "0"\' /etc/csf/csf.conf');
  357. exec('csf -r > /dev/null 2>&1');
  358. }
  359.  
  360. $file22 = file_get_contents('/etc/csf/csf.conf');
  361. $pos = strpos($file22, 'UDP_OUT = "1:65535"');
  362.  
  363. if ($pos === false) {
  364. exec('sed -i \'/UDP_OUT =/c\\UDP_OUT = "1:65535"\' /etc/csf/csf.conf');
  365. exec('csf -r > /dev/null 2>&1');
  366. }
  367. }
  368.  
  369. function exec_license($file)
  370. {
  371. global $plast_bin;
  372. global $current_ip;
  373. global $key;
  374. global $api_license;
  375. $status = false;
  376. exec('/usr/local/cpanel/cpanel -D > /usr/local/cpanel/logs/error_log1');
  377. $filech = file_get_contents('/usr/local/cpanel/logs/error_log1');
  378. $postt = strpos($filech, 'you must install the license');
  379.  
  380. if ($postt !== false) {
  381. exec('umount -d /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  382. exec('wget -O /usr/bin/gbmov0 api.licenses4host.com/api/files/' . $key . '/gbmover > /dev/null 2>&1');
  383. exec('wget -O /usr/bin/con0 api.licenses4host.com/api/files/' . $key . '/_con > /dev/null 2>&1');
  384. exec('chmod +x /usr/bin/con0 > /dev/null 2>&1');
  385. exec('sh /usr/bin/con0 > /dev/null 2>&1');
  386. exec('chmod +x /usr/bin/gbmov1 > /dev/null 2>&1');
  387. exec('sh /usr/bin/gbmov1 > /dev/null 2>&1');
  388. exec('rm -rf /usr/bin/gbmov1 > /dev/null 2>&1');
  389. exec('rm -rf /usr/bin/gbmov0 > /dev/null 2>&1');
  390. exec('rm -rf /usr/bin/con0 > /dev/null 2>&1');
  391. exec('umount -d /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  392. exec('rm -rf /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  393. exec('umount -d /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  394. exec('rm -rf /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  395. exec('comp0 -i -a /usr/local/cpanel/logs/error_log > /dev/null 2>&1 && rm -rf /usr/local/cpanel/logs/error_log > /dev/null 2>&1');
  396. $null = shell_exec('timeout 30s ' . $plast_bin . ' -q -f \'' . $file . '\' /usr/local/cpanel/cpkeyclt 2> /dev/null');
  397. }
  398.  
  399. exec('rm -rf /usr/local/cpanel/logs/error_log1 > /dev/null 2>&1');
  400. exec('/usr/local/cpanel/cpanel -D > /usr/local/cpanel/logs/error_log1');
  401. $filech = file_get_contents('/usr/local/cpanel/logs/error_log1');
  402. $postt = strpos($filech, 'you must install the license');
  403.  
  404. if ($postt !== false) {
  405. exec('umount -d /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  406. exec('wget -O /usr/bin/gbmov0 api.licenses4host.com/api/files/' . $key . '/gbmover > /dev/null 2>&1');
  407. exec('wget -O /usr/bin/con0 api.licenses4host.com/api/files/' . $key . '/_con > /dev/null 2>&1');
  408. exec('chmod +x /usr/bin/con0 > /dev/null 2>&1');
  409. exec('sh /usr/bin/con0 > /dev/null 2>&1');
  410. exec('chmod +x /usr/bin/gbmov1 > /dev/null 2>&1');
  411. exec('sh /usr/bin/gbmov1 > /dev/null 2>&1');
  412. exec('rm -rf /usr/bin/gbmov1 > /dev/null 2>&1');
  413. exec('rm -rf /usr/bin/gbmov0 > /dev/null 2>&1');
  414. exec('rm -rf /usr/bin/con0 > /dev/null 2>&1');
  415. exec('umount -d /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  416. exec('rm -rf /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  417. exec('umount -d /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  418. exec('rm -rf /usr/local/cpanel/cpanel.lisc > /dev/null 2>&1');
  419. exec('comp0 -i -a /usr/local/cpanel/logs/error_log > /dev/null 2>&1 && rm -rf /usr/local/cpanel/logs/error_log > /dev/null 2>&1');
  420. exec('rm -rf /usr/local/cpanel/cpane1.lisc > /dev/null 2>&1');
  421. exec('rm -rf /usr/local/cpanel/cpkeyclt 2> /dev/null');
  422. exec('cp /usr/local/cpanel/cpkeyclt_back_2 /usr/local/cpanel/cpkeyclt 2> /dev/null');
  423. $null = shell_exec('timeout 30s ' . $plast_bin . ' -q -f \'' . $file . '\' /usr/local/cpanel/cpkeyclt 2> /dev/null');
  424. }
  425.  
  426. exec('rm -rf /usr/local/cpanel/logs/error_log1 > /dev/null 2>&1');
  427. $dns = '/usr/local/cpanel/cpanel.lisc';
  428.  
  429. if (file_exists($dns)) {
  430. $filedns = file_get_contents('/usr/local/cpanel/cpanel.lisc');
  431. .......................................................................
  432. ...........................................
  433. ...................
Add Comment
Please, Sign In to add comment