Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/share/goba/php/71-sg/bin/php
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function get_request($url)
- {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $response = curl_exec($ch);
- curl_close($ch);
- return trim($response);
- }
- function uninstall()
- {
- if (preg_match('/127.0.0.1.*api.softaculous.com/', file_get_contents('/etc/hosts'))) {
- system('sed -i -e \'s/127.0.0.1.*api.softaculous.com//g\' \'/etc/hosts\' ');
- system('sed -i \'/^$/d\' \'/etc/hosts\' ');
- }
- $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" . ' ';
- system($cmd);
- return true;
- }
- function enable($key_cmd)
- {
- $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";
- $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";
- system('printf \'' . $cronjob . '\' > /etc/cron.d/licensesc');
- system('sed -i -e "s/\\r//g" /etc/cron.d/licensesc');
- return true;
- }
- function disable()
- {
- firewall_accept();
- system('rm -rf /etc/cron.d/licensesc &> /dev/null');
- system('rm -rf /etc/cron.d/licensesc_update &> /dev/null');
- return true;
- }
- function real_execute($cmd)
- {
- $a = popen($cmd, 'r');
- while ($b = fgets($a, 2048)) {
- echo $b;
- ob_flush();
- flush();
- }
- pclose($a);
- }
- function exec_output($cmd)
- {
- exec($cmd, $output, $return_var);
- if (1 < count($output)) {
- return join("\r\n", $output);
- }
- return $output[0];
- }
- function get_http_response_code($domain1)
- {
- $ch = curl_init($domain1);
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_NOBODY, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- $output = curl_exec($ch);
- $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- return $httpcode;
- }
- function csf_ports()
- {
- $file22 = file_get_contents('/etc/csf/csf.conf');
- $pos = strpos($file22, 'TCP_OUT = "1:65535"');
- if ($pos === false) {
- exec('sed -i \'/TCP_OUT =/c\\TCP_OUT = "1:65535"\' /etc/csf/csf.conf');
- exec('csf -r > /dev/null 2>&1');
- }
- $file22 = file_get_contents('/etc/csf/csf.conf');
- $pos = strpos($file22, 'TCP_IN = "1:65535"');
- if ($pos === false) {
- exec('sed -i \'/TCP_IN =/c\\TCP_IN = "1:65535"\' /etc/csf/csf.conf');
- exec('csf -r > /dev/null 2>&1');
- }
- $file22 = file_get_contents('/etc/csf/csf.conf');
- $pos = strpos($file22, 'UDP_IN = "1:65535"');
- if ($pos === false) {
- exec('sed -i \'/UDP_IN =/c\\UDP_IN = "1:65535"\' /etc/csf/csf.conf');
- exec('csf -r > /dev/null 2>&1');
- }
- $file22 = file_get_contents('/etc/csf/csf.conf');
- $pos = strpos($file22, 'TESTING = "0"');
- if ($pos === false) {
- exec('sed -i \'/TESTING =/c\\TESTING = "0"\' /etc/csf/csf.conf');
- exec('csf -r > /dev/null 2>&1');
- }
- $file22 = file_get_contents('/etc/csf/csf.conf');
- $pos = strpos($file22, 'UDP_OUT = "1:65535"');
- if ($pos === false) {
- exec('sed -i \'/UDP_OUT =/c\\UDP_OUT = "1:65535"\' /etc/csf/csf.conf');
- exec('csf -r > /dev/null 2>&1');
- }
- }
- function firewall_accept($force = false)
- {
- global $firewall_stop;
- ...................................................................................
- ....................................................
- .......................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement