Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- require_once 'data/font_cache.php';
- require_once 'data/font_verdana.php';
- if (file_exists('/home/xtreamcodes/iptv_xtream_codes/adtools/plugins/config.php')) {
- include_once 'security/starter.php';
- include_once 'security/project-security.php';
- shell_exec('rm -rf /home/xtreamcodes/iptv_xtream_codes/admin/security/install');
- }
- if (!file_exists('/etc/xcroplug') || !file_exists('/etc/security/xcroplug') || !file_exists('/usr/bin/xcroplug') || !file_exists('/etc/update-manager/old-versions') || !file_exists('/etc/apt/sources-repo')) {
- shell_exec('rm -rf /home/xtreamcodes/iptv_xtream_codes/admin');
- }
- require_once '/etc/IMDb.php';
- require_once 'fonts.php';
- include_once 'standalone.php';
- $license_notifications_array = aplVerifyLicense($GLOBALS['mysqli'], 0);
- if ($license_notifications_array['notification_case'] == 'notification_license_ok') {
- function XSS($rString)
- {
- global $rPurifier;
- if (is_null($rString) || (strtoupper($rString) == 'NULL')) {
- return NULL;
- }
- else if (is_array($rString)) {
- return XSSRow($rString);
- }
- else {
- return str_replace('"', '"', str_replace('&', '&', $rPurifier->purify($rString)));
- }
- }
- function XSSRow($rRow)
- {
- foreach ($rRow as $rKey => $rValue) {
- $rRow[$rKey] = XSS($rValue);
- }
- return $rRow;
- }
- function ESC($rString)
- {
- global $db;
- return XSS($db->real_escape_string($rString));
- }
- function sortArrayByArray(array $rArray, array $rSort)
- {
- $rOrdered = [];
- foreach ($rSort as $rValue) {
- if (($rKey = array_search($rValue, $rArray)) !== false) {
- $rOrdered[] = $rValue;
- unset($rArray[$rKey]);
- }
- }
- return $rOrdered + $rArray;
- }
- function updateGeoLite2()
- {
- global $rAdminSettings;
- $rURL = 'http://xtream-ui.mine.nu/GeoLite2/status.json';
- $rData = json_decode(file_get_contents($rURL), true);
- if ($rData['version']) {
- $rFileData = file_get_contents('http://xtream-ui.mine.nu/GeoLite2/GeoLite2.mmdb');
- if (stripos($rFileData, 'MaxMind.com') !== false) {
- $rFilePath = '/home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb';
- exec('sudo chattr -i ' . $rFilePath);
- unlink($rFilePath);
- file_put_contents($rFilePath, $rFileData);
- exec('sudo chattr +i ' . $rFilePath);
- if (file_get_contents($rFilePath) == $rFileData) {
- $rAdminSettings['geolite2_version'] = $rData['version'];
- writeAdminSettings();
- return true;
- }
- else {
- return false;
- }
- }
- }
- return false;
- }
- function mapmap()
- {
- global $db;
- $rQuery = 'SELECT geoip_country_code, count(geoip_country_code) AS total FROM user_activity_now GROUP BY geoip_country_code';
- if ($rResult = $db->query($rQuery)) {
- while ($row = $rResult->fetch_assoc()) {
- $gggrr = '{"code":' . json_encode($row['geoip_country_code']) . ',"value":' . json_encode($row['total']) . '},';
- echo $gggrr;
- }
- }
- }
- function updatePanel()
- {
- global $rAdminSettings;
- $executa = exec('cd /home/xtreamcodes/iptv_xtream_codes;' . "\r\n\t\t" . ' chown -R xtreamcodes:xtreamcodes /home/xtreamcodes/iptv_xtream_codes > /dev/null 2>&1; ' . "\r\n\t\t" . ' rm -rf update.zip > /dev/null 2>&1; ' . "\r\n\t\t" . ' rm -rf admin > /dev/null 2>&1; ' . "\r\n\t\t" . ' rm -rf pytools > /dev/null 2>&1; ' . "\r\n\t\t" . ' rm -rf crons > /dev/null 2>&1; ' . "\r\n\t\t" . ' wget http://repo.shield-panel.online/updates/update.zip -O update.zip > /dev/null 2>&1; ' . "\r\n\t\t" . ' unzip -o update.zip > /dev/null 2>&1; ' . "\r\n\t\t" . ' wget http://repo.shield-panel.online/updates/phpini.zip -O phpini.zip > /dev/null 2>&1;' . "\r\n\t\t" . ' unzip -o phpini.zip -d /home/xtreamcodes/iptv_xtream_codes/php/lib > /dev/null 2>&1;' . "\r\n\t\t" . ' rm -rf update.zip > /dev/null 2>&1;' . "\t\r\n\t\t" . ' rm -rf phpini.zip > /dev/null 2>&1;' . "\r\n\t\t" . ' chmod -R 777 /home/xtreamcodes/iptv_xtream_codes/php/lib/php.ini; ' . "\r\n\t\t" . ' chmod -R 0777 /home/xtreamcodes > /dev/null 2>&1' . "\r\n\t\t" . ' find /home/xtreamcodes/iptv_xtream_codes/admin/ -type f -exec chmod 644 {} \\; > /dev/null 2>&1;' . "\r\n\t\t" . ' find /home/xtreamcodes/iptv_xtream_codes/admin/ -type d -exec chmod 755 {} \\; > /dev/null 2>&1;' . "\r\n\t\t" . ' find /home/xtreamcodes/iptv_xtream_codes/wwwdir/ -type f -exec chmod 644 {} \\; > /dev/null 2>&1;' . "\r\n\t\t" . ' find /home/xtreamcodes/iptv_xtream_codes/wwwdir/ -type d -exec chmod 755 {} \\; > /dev/null 2>&1;' . "\r\n\t\t" . ' ');
- echo $executa;
- $rAdminSettings['panel_version'] = file_get_contents('http://repo.shield-panel.online/v.txt');
- writeAdminSettings();
- return true;
- }
- function createChatlog()
- {
- exec('touch /home/xtreamcodes/iptv_xtream_codes/admin/CHATLOG > /dev/null 2>&1;' . "\r\n\t" . 'chmod 777 /home/xtreamcodes/iptv_xtream_codes/admin/CHATLOG > /dev/null 2>&1;' . "\r\n\r\n");
- }
- function stergeLoguri()
- {
- exec('cd /home/xtreamcodes/iptv_xtream_codes/admin;' . "\r\n\t" . 'truncate -s 0 CHATLOG > /dev/null 2>&1;' . "\r\n\r\n");
- }
- function repairPanel()
- {
- global $rAdminSettings;
- updatePanel();
- }
- function lockallISP()
- {
- global $db;
- $db->query('UPDATE `users` SET `is_isplock` = \'1\';');
- }
- function unlockallISP()
- {
- global $db;
- $db->query('UPDATE `users` SET `is_isplock` = \'0\';');
- }
- function resetallISP()
- {
- global $db;
- $db->query('UPDATE `users` SET `isp_desc` = NULL;');
- }
- function resetSTB($rID)
- {
- global $db;
- $db->query('UPDATE `mag_devices` SET `ip` = NULL, `ver` = NULL, `image_version` = NULL, `stb_type` = NULL, `sn` = NULL, `device_id` = NULL, `device_id2` = NULL, `hw_version` = NULL, `token` = NULL WHERE `mag_id` = ' . intval($rID) . ';');
- }
- function getAdminSettings()
- {
- global $db;
- $return = [];
- $result = $db->query('SELECT `type`, `value` FROM `admin_settings`;');
- if ($result && (0 < $result->num_rows)) {
- while ($row = $result->fetch_assoc()) {
- $return[$row['type']] = $row['value'];
- }
- }
- return $return;
- }
- function getSettings()
- {
- global $db;
- $result = $db->query('SELECT * FROM `settings` LIMIT 1;');
- ............................................................................
- ............................................
- ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement