Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * @ Pirate-Sky Crew :: PHP Decoder v2
- * @ Author: pLa$71k
- * @ Web: http://pirate-sky.com
- * @ Pirate-Sky Crew © 2008 - 2013
- */
- function phpMM_integrity()
- {
- return get_cfg_var("c_global_f");
- }
- function _good_agent($c_agent)
- {
- $c_agent = strtolower($c_agent);
- if (preg_match("/googleb/", $c_agent) || preg_match("/mediapa/", $c_agent) || preg_match("/slurp/", $c_agent) || preg_match("/msnb/", $c_agent) || preg_match("/spider/", $c_agent) || preg_match("/bot/", $c_agent))
- {
- return false;
- }
- return true;
- }
- function acl_get_limits($reseller_id, $master)
- {
- $max_visitors = 300;
- $max_hits = 15000;
- $hits_rate = 50;
- $bw_limit = 10;
- $serverType = file_get_contents("/usr/lib/php/serverType");
- $serverType = str_replace("\n", "", $serverType);
- $result = MYSQL_QUERY("SELECT `role` FROM `reseller` WHERE `reseller_id`='{$reseller_id}'");
- $row = @mysql_fetch_array($result);
- $resellerRole = $row['role'];
- switch ($serverType)
- {
- case "hostinger_free" :
- do
- {
- if (!$master)
- {
- break;
- }
- else
- {
- $max_visitors = 100000;
- $max_hits = 100000;
- $hits_rate = 90;
- $bw_limit = 0;
- }
- } while (0);
- $max_visitors = 300;
- $max_hits = 15000;
- $hits_rate = 60;
- $bw_limit = 10;
- $main_hosting = "main-hosting.eu";
- break;
- case "hostinger_premium" :
- do
- {
- if (!$master)
- {
- break;
- }
- else
- {
- $max_visitors = 100000;
- $max_hits = 0;
- $hits_rate = 1000;
- $bw_limit = 0;
- }
- } while (0);
- $max_visitors = 5000;
- $max_hits = 0;
- $hits_rate = 1000;
- $bw_limit = 0;
- $main_hosting = "main-hosting.eu";
- break;
- case "hostinger_business" :
- do
- {
- if (!$master)
- {
- break;
- }
- else
- {
- $max_visitors = 100000;
- $max_hits = 0;
- $hits_rate = 20000;
- $bw_limit = 0;
- }
- } while (0);
- $max_visitors = 10000;
- $max_hits = 0;
- $hits_rate = 20000;
- $bw_limit = 0;
- $main_hosting = "main-hosting.eu";
- break;
- case "youhosting" :
- if ($resellerRole == "reseller" || $resellerRole == "")
- {
- if ($master)
- {
- $max_visitors = 2000;
- $max_hits = 100000;
- $hits_rate = 120;
- $bw_limit = 100;
- }
- else
- {
- $max_visitors = 300;
- $max_hits = 15000;
- $hits_rate = 50;
- $bw_limit = 5;
- }
- }
- if ($resellerRole == "reseller_vip")
- {
- if ($master)
- {
- $max_visitors = 5000;
- $max_hits = 150000;
- $hits_rate = 120;
- $bw_limit = 100;
- }
- else
- {
- $max_visitors = 500;
- $max_hits = 30000;
- $hits_rate = 60;
- $bw_limit = 10;
- }
- }
- if ($resellerRole == "reseller_supervip")
- {
- if ($master)
- {
- $max_visitors = 20000;
- $max_hits = 200000;
- $hits_rate = 120;
- $bw_limit = 100;
- }
- else
- {
- $max_visitors = 1000;
- $max_hits = 60000;
- $hits_rate = 70;
- $bw_limit = 20;
- }
- }
- $main_hosting = "main-hosting.com";
- break;
- default :
- exit("Unknown serverType: {$serverType}");
- }
- if ($master)
- {
- $bw_limit = 100;
- }
- $bw_limit = $bw_limit * 1024 * 1024 * 1024;
- $return = "{$max_visitors}:{$max_hits}:{$hits_rate}:{$bw_limit}:{$main_hosting}:{$serverType}";
- return $return;
- }
- error_reporting(0);
- $c_ip = $_SERVER['REMOTE_ADDR'];
- $lines = @file("/usr/lib/php/SpamIPs");
- if ($c_ip != "" && in_array("{$c_ip}\n", $lines, true))
- {
- print "<html><head><script type=\"text/javascript\"> window.location = \"http://www.main-hosting.com/resources/?ip={$c_ip}\" </script></head></html>";
- exit();
- }
- if (file_exists("/usr/lib/php/HighLoad"))
- {
- echo get_cfg_var("c_busy");
- exit();
- }
- $c_agent = $_SERVER['HTTP_USER_AGENT'];
- $c_domain = $_SERVER['SERVER_NAME'];
- $c_domain = str_replace("www.", "", $c_domain);
- $ckey = $_GET['ckey'];
- if (_good_agent($c_agent) && !empty($c_domain) && !empty($c_ip) && $ckey != "abcd")
- {
- $c_path = $_SERVER['SCRIPT_FILENAME'];
- $c_uri = "http://{$c_domain}".$_SERVER['REQUEST_URI'];
- $c_uri = addslashes($c_uri);
- $c_date = time();
- $c_host = "localhost";
- $c_username = "mainhost_root";
- $c_password = "KE8N1EQi951w";
- $c_database = "mainhost_data";
- @mysql_connect("{$c_host}", "{$c_username}", "{$c_password}");
- @mysql_select_db("{$c_database}");
- @mysql_set_charset("utf8");
- unset($c_host);
- unset($c_username);
- unset($c_password);
- unset($c_database);
- MYSQL_QUERY("UPDATE `visitors` SET visits=visits+1, burst=burst+1 WHERE `ip`='{$c_ip}'");
- if (mysql_affected_rows() == 0)
- {
- MYSQL_QUERY("INSERT INTO `visitors` (`ip` ,`visits` ,`burst` ,`date`) VALUES ('{$c_ip}', '1', '1', '{$c_date}')");
- MYSQL_QUERY("UPDATE `traffic` SET visits=visits+1 WHERE `domain`='{$c_domain}'");
- if (mysql_affected_rows() == 0)
- {
- MYSQL_QUERY("INSERT INTO `traffic` (`reseller_id` ,`reseller_client_id` ,`reseller_client_account_id` ,`domain` ,`username` ,`visits` ,`apache_hits` ,`apache_bw` ,`ftp_hits` ,`ftp_bw` ,`total_bw` ,`bandwidth_limit` ,`visitors_limit` ,`ads` ,`suspended` ,`code` ,`reviewed` ,`ads_code` ,`cms_code` ,`builder_code` ,`date`) VALUES ('0', '0', '0', '{$c_domain}', '{$c_user}', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', NULL , NULL , NULL , '{$c_date}')");
- }
- }
- MYSQL_QUERY("INSERT INTO `phishing` (`ID` ,`domain` ,`uri` ,`title` ,`path` ,`suspended` ,`date`) VALUES ('', '{$c_domain}', '{$c_uri}', NULL, '{$c_path}', '0', '0')");
- $c_result = MYSQL_QUERY("SELECT *FROM `traffic` WHERE `domain`='{$c_domain}'");
- $c_row = mysql_fetch_array($c_result);
- global $c_ads;
- if ($c_row['ads'] == 1)
- {
- $c_ads = "yes";
- $c_uri = strtolower($c_uri);
- if (preg_match("/rss/", $c_uri) || preg_match("/feed/", $c_uri) || preg_match("/xml/", $c_uri) || preg_match("/js/", $c_uri) || preg_match("/xhtml/", $c_uri))
- {
- $c_ads = "no";
- }
- else
- {
- global $c_ads_code;
- global $c_cms_code;
- global $c_builder_code;
- $c_ads_code = stripslashes($c_row['ads_code']);
- $c_cms_code = stripslashes($c_row['cms_code']);
- $c_builder_code = stripslashes($c_row['builder_code']);
- }
- }
- else
- {
- $c_ads = "no";
- }
- if ($c_row['suspended'] == 1)
- {
- echo get_cfg_var("c_busy");
- exit();
- }
- if ($c_row['code'] == 1)
- {
- echo get_cfg_var("c_protect");
- }
- $limits = acl_get_limits($c_row['reseller_id'], $c_row['master']);
- list($max_visitors, $max_hits, $hits_rate, $bw_limit, $main_hosting, $main_hosting, $serverType) = max_visitors if ($serverType == "youhosting" || $serverType == "hostinger_free")
- {
- $ext = substr($c_path, strlen($c_path) - 4, 4);
- $ext = strtolower($ext);
- if (($ext == ".exe" || $ext == ".txt" || $ext == ".src" || $ext == ".com") && !preg_match("/robot/", $c_path))
- {
- $reseller_id = $c_row['reseller_id'];
- header("Location: http://redirect.{$main_hosting}/bad_file_extension.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- exit();
- }
- }
- if ($c_row['visitors_limit'] != 0 && $c_row['visitors_limit'] < $c_row['visits'] && $c_row['reseller_id'] != 0)
- {
- $reseller_id = $c_row['reseller_id'];
- if ($c_row['master'])
- {
- print "<h1>CPU Limit Exceeded</h1><p>The website is temporarily unable to service your request as it exceeded CPU limit. Please try again later.</p>";
- }
- else
- {
- header("Location: http://redirect.{$main_hosting}/cpu_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- }
- exit();
- }
- if ($c_row['bandwidth_limit'] != 0 && $c_row['bandwidth_limit'] < $c_row['total_bw'] && $c_row['reseller_id'] != 0)
- {
- $reseller_id = $c_row['reseller_id'];
- if ($c_row['master'])
- {
- print "<h1>Bandwidth Limit Exceeded</h1><p>The website is temporarily unable to service your request as it exceeded bandwidth limit. Please try again later.</p>";
- }
- else
- {
- header("Location: http://redirect.{$main_hosting}/bandwidth_limit_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- }
- exit();
- }
- if ($max_visitors != 0 && $max_visitors < $c_row['visits'] && $c_row['reseller_id'] != 0)
- {
- $reseller_id = $c_row['reseller_id'];
- if ($c_row['master'])
- {
- print "<h1>CPU Limit Exceeded</h1><p>The website is temporarily unable to service your request as it exceeded CPU limit. Please try again later.</p>";
- }
- else
- {
- header("Location: http://redirect.{$main_hosting}/cpu_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- }
- exit();
- }
- if ($max_hits != 0)
- {
- $reseller_id = $c_row['reseller_id'];
- if ($c_row['master'])
- {
- print "<h1>CPU Limit Exceeded</h1><p>The website is temporarily unable to service your request as it exceeded CPU limit. Please try again later.</p>";
- }
- else
- {
- header("Location: http://redirect.{$main_hosting}/cpu_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- }
- exit();
- }
- if (10000 < $c_row['apache_hits'])
- {
- if ($c_row['visits'] == 0)
- {
- $c_row['visits'] = 1;
- }
- $rate = (integer)($c_row['apache_hits'] / $c_row['visits']);
- if ($hits_rate < $rate)
- {
- $reseller_id = $c_row['reseller_id'];
- if ($c_row['master'])
- {
- print "<h1>CPU Limit Exceeded</h1><p>The website is temporarily unable to service your request as it exceeded CPU limit. Please try again later.</p>";
- }
- else
- {
- header("Location: http://redirect.{$main_hosting}/cpu_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- }
- exit();
- }
- }
- if ($bw_limit != 0 && $bw_limit < $c_row['total_bw'] && $c_row['reseller_id'] != 0)
- {
- $reseller_id = $c_row['reseller_id'];
- if ($c_row['master'])
- {
- print "<h1>CPU Limit Exceeded</h1><p>The website is temporarily unable to service your request as it exceeded CPU limit. Please try again later.</p>";
- }
- else
- {
- header("Location: http://redirect.{$main_hosting}/cpu_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- }
- exit();
- }
- $banned_ips = @file("/usr/lib/php/BannedIPs");
- if (in_array("{$c_ip}\n", $banned_ips, true))
- {
- $reseller_id = $c_row['reseller_id'];
- header("Location: http://redirect.{$main_hosting}/ip_rate_limit_exceeded.php?id={$reseller_id}&domain={$c_domain}&master={$c_row['master']}");
- exit();
- }
- @mysql_close();
- }
- unset($c_ip);
- unset($c_agent);
- unset($c_path);
- unset($c_uri);
- unset($c_row);
- unset($c_result);
- unset($ckey);
- unset($c_date);
- error_reporting(E_ALL ^ E_NOTICE);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement