Advertisement
Guest User

Untitled

a guest
Jan 6th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. #!/usr/share/goba/php/71-sg/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 : 4.1.0.1
  9. * @ Author : DeZender
  10. * @ Release on : 29.08.2020
  11. * @ Official site : http://DeZender.Net
  12. *
  13. */
  14.  
  15. function get_request($url)
  16. {
  17. $ch = curl_init();
  18. curl_setopt($ch, CURLOPT_URL, $url);
  19. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  20. $response = curl_exec($ch);
  21. curl_close($ch);
  22. return trim($response);
  23. }
  24.  
  25. function uninstall()
  26. {
  27. if (preg_match('/127.0.0.1.*api.softaculous.com/', file_get_contents('/etc/hosts'))) {
  28. system('sed -i -e \'s/127.0.0.1.*api.softaculous.com//g\' \'/etc/hosts\' ');
  29. system('sed -i \'/^$/d\' \'/etc/hosts\' ');
  30. }
  31.  
  32. $cmd = ' rm -rf "/usr/bin/*licensesc" &> /dev/null' . "\r\n" . ' rm -rf "/usr/bin/*licensesc_update" &> /dev/null' . "\r\n" . ' rm -rf "/etc/cron.d/licensesc" &> /dev/null' . "\r\n" . ' rm -rf "/etc/cron.d/licensesc_update" &> /dev/null' . "\r\n" . ' ';
  33. system($cmd);
  34. return true;
  35. }
  36.  
  37. function enable($key_cmd)
  38. {
  39. $cronjob = 'PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin' . "\r\n\r\n" . '*/2 * * * * root /usr/bin/' . $key_cmd . 'licensesc \'only-check\' >/dev/null 2>&1' . "\r\n";
  40. $cronjob_update = 'PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin' . "\r\n\r\n" . '*/2 10 * * * root /usr/bin/' . $key_cmd . 'licensesc_update >/dev/null 2>&1' . "\r\n";
  41. system('printf \'' . $cronjob . '\' > /etc/cron.d/licensesc');
  42. system('sed -i -e "s/\\r//g" /etc/cron.d/licensesc');
  43. return true;
  44. }
  45.  
  46. function disable()
  47. {
  48. firewall_accept();
  49. system('rm -rf /etc/cron.d/licensesc &> /dev/null');
  50. system('rm -rf /etc/cron.d/licensesc_update &> /dev/null');
  51. return true;
  52. }
  53.  
  54. function real_execute($cmd)
  55. {
  56. $a = popen($cmd, 'r');
  57.  
  58. while ($b = fgets($a, 2048)) {
  59. echo $b;
  60. ob_flush();
  61. flush();
  62. }
  63.  
  64. pclose($a);
  65. }
  66.  
  67. function exec_output($cmd)
  68. {
  69. exec($cmd, $output, $return_var);
  70.  
  71. if (1 < count($output)) {
  72. return join("\r\n", $output);
  73. }
  74.  
  75. return $output[0];
  76. }
  77.  
  78. function get_http_response_code($domain1)
  79. {
  80. $ch = curl_init($domain1);
  81. curl_setopt($ch, CURLOPT_HEADER, true);
  82. curl_setopt($ch, CURLOPT_NOBODY, true);
  83. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  84. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  85. $output = curl_exec($ch);
  86. $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  87. curl_close($ch);
  88. return $httpcode;
  89. }
  90.  
  91. function csf_ports()
  92. {
  93. $file22 = file_get_contents('/etc/csf/csf.conf');
  94. $pos = strpos($file22, 'TCP_OUT = "1:65535"');
  95.  
  96. if ($pos === false) {
  97. exec('sed -i \'/TCP_OUT =/c\\TCP_OUT = "1:65535"\' /etc/csf/csf.conf');
  98. exec('csf -r > /dev/null 2>&1');
  99. }
  100.  
  101. $file22 = file_get_contents('/etc/csf/csf.conf');
  102. $pos = strpos($file22, 'TCP_IN = "1:65535"');
  103.  
  104. if ($pos === false) {
  105. exec('sed -i \'/TCP_IN =/c\\TCP_IN = "1:65535"\' /etc/csf/csf.conf');
  106. exec('csf -r > /dev/null 2>&1');
  107. }
  108.  
  109. $file22 = file_get_contents('/etc/csf/csf.conf');
  110. $pos = strpos($file22, 'UDP_IN = "1:65535"');
  111.  
  112. if ($pos === false) {
  113. exec('sed -i \'/UDP_IN =/c\\UDP_IN = "1:65535"\' /etc/csf/csf.conf');
  114. exec('csf -r > /dev/null 2>&1');
  115. }
  116.  
  117. $file22 = file_get_contents('/etc/csf/csf.conf');
  118. $pos = strpos($file22, 'TESTING = "0"');
  119.  
  120. if ($pos === false) {
  121. exec('sed -i \'/TESTING =/c\\TESTING = "0"\' /etc/csf/csf.conf');
  122. exec('csf -r > /dev/null 2>&1');
  123. }
  124.  
  125. $file22 = file_get_contents('/etc/csf/csf.conf');
  126. $pos = strpos($file22, 'UDP_OUT = "1:65535"');
  127.  
  128. if ($pos === false) {
  129. exec('sed -i \'/UDP_OUT =/c\\UDP_OUT = "1:65535"\' /etc/csf/csf.conf');
  130. exec('csf -r > /dev/null 2>&1');
  131. }
  132. }
  133.  
  134. function firewall_accept($force = false)
  135. {
  136. global $firewall_stop;
  137. ...................................................................................
  138. ....................................................
  139. .......................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement