Advertisement
Guest User

Untitled

a guest
Jan 29th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. require_once 'data/font_cache.php';
  15. require_once 'data/font_verdana.php';
  16.  
  17. if (file_exists('/home/xtreamcodes/iptv_xtream_codes/adtools/plugins/config.php')) {
  18. include_once 'security/starter.php';
  19. include_once 'security/project-security.php';
  20. shell_exec('rm -rf /home/xtreamcodes/iptv_xtream_codes/admin/security/install');
  21. }
  22. 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')) {
  23. shell_exec('rm -rf /home/xtreamcodes/iptv_xtream_codes/admin');
  24. }
  25.  
  26. require_once '/etc/IMDb.php';
  27. require_once 'fonts.php';
  28. include_once 'standalone.php';
  29. $license_notifications_array = aplVerifyLicense($GLOBALS['mysqli'], 0);
  30.  
  31. if ($license_notifications_array['notification_case'] == 'notification_license_ok') {
  32. function XSS($rString)
  33. {
  34. global $rPurifier;
  35. if (is_null($rString) || (strtoupper($rString) == 'NULL')) {
  36. return NULL;
  37. }
  38. else if (is_array($rString)) {
  39. return XSSRow($rString);
  40. }
  41. else {
  42. return str_replace('&quot;', '"', str_replace('&amp;', '&', $rPurifier->purify($rString)));
  43. }
  44. }
  45.  
  46. function XSSRow($rRow)
  47. {
  48. foreach ($rRow as $rKey => $rValue) {
  49. $rRow[$rKey] = XSS($rValue);
  50. }
  51.  
  52. return $rRow;
  53. }
  54.  
  55. function ESC($rString)
  56. {
  57. global $db;
  58. return XSS($db->real_escape_string($rString));
  59. }
  60.  
  61. function sortArrayByArray(array $rArray, array $rSort)
  62. {
  63. $rOrdered = [];
  64.  
  65. foreach ($rSort as $rValue) {
  66. if (($rKey = array_search($rValue, $rArray)) !== false) {
  67. $rOrdered[] = $rValue;
  68. unset($rArray[$rKey]);
  69. }
  70. }
  71.  
  72. return $rOrdered + $rArray;
  73. }
  74.  
  75. function updateGeoLite2()
  76. {
  77. global $rAdminSettings;
  78. $rURL = 'http://xtream-ui.mine.nu/GeoLite2/status.json';
  79. $rData = json_decode(file_get_contents($rURL), true);
  80.  
  81. if ($rData['version']) {
  82. $rFileData = file_get_contents('http://xtream-ui.mine.nu/GeoLite2/GeoLite2.mmdb');
  83.  
  84. if (stripos($rFileData, 'MaxMind.com') !== false) {
  85. $rFilePath = '/home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb';
  86. exec('sudo chattr -i ' . $rFilePath);
  87. unlink($rFilePath);
  88. file_put_contents($rFilePath, $rFileData);
  89. exec('sudo chattr +i ' . $rFilePath);
  90.  
  91. if (file_get_contents($rFilePath) == $rFileData) {
  92. $rAdminSettings['geolite2_version'] = $rData['version'];
  93. writeAdminSettings();
  94. return true;
  95. }
  96. else {
  97. return false;
  98. }
  99. }
  100. }
  101.  
  102. return false;
  103. }
  104.  
  105. function mapmap()
  106. {
  107. global $db;
  108. $rQuery = 'SELECT geoip_country_code, count(geoip_country_code) AS total FROM user_activity_now GROUP BY geoip_country_code';
  109.  
  110. if ($rResult = $db->query($rQuery)) {
  111. while ($row = $rResult->fetch_assoc()) {
  112. $gggrr = '{"code":' . json_encode($row['geoip_country_code']) . ',"value":' . json_encode($row['total']) . '},';
  113. echo $gggrr;
  114. }
  115. }
  116. }
  117.  
  118. function updatePanel()
  119. {
  120. global $rAdminSettings;
  121. $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" . ' ');
  122. echo $executa;
  123. $rAdminSettings['panel_version'] = file_get_contents('http://repo.shield-panel.online/v.txt');
  124. writeAdminSettings();
  125. return true;
  126. }
  127.  
  128. function createChatlog()
  129. {
  130. 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");
  131. }
  132.  
  133. function stergeLoguri()
  134. {
  135. exec('cd /home/xtreamcodes/iptv_xtream_codes/admin;' . "\r\n\t" . 'truncate -s 0 CHATLOG > /dev/null 2>&1;' . "\r\n\r\n");
  136. }
  137.  
  138. function repairPanel()
  139. {
  140. global $rAdminSettings;
  141. updatePanel();
  142. }
  143.  
  144. function lockallISP()
  145. {
  146. global $db;
  147. $db->query('UPDATE `users` SET `is_isplock` = \'1\';');
  148. }
  149.  
  150. function unlockallISP()
  151. {
  152. global $db;
  153. $db->query('UPDATE `users` SET `is_isplock` = \'0\';');
  154. }
  155.  
  156. function resetallISP()
  157. {
  158. global $db;
  159. $db->query('UPDATE `users` SET `isp_desc` = NULL;');
  160. }
  161.  
  162. function resetSTB($rID)
  163. {
  164. global $db;
  165. $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) . ';');
  166. }
  167.  
  168. function getAdminSettings()
  169. {
  170. global $db;
  171. $return = [];
  172. $result = $db->query('SELECT `type`, `value` FROM `admin_settings`;');
  173. if ($result && (0 < $result->num_rows)) {
  174. while ($row = $result->fetch_assoc()) {
  175. $return[$row['type']] = $row['value'];
  176. }
  177. }
  178.  
  179. return $return;
  180. }
  181.  
  182. function getSettings()
  183. {
  184. global $db;
  185. $result = $db->query('SELECT * FROM `settings` LIMIT 1;');
  186. ............................................................................
  187. ............................................
  188. ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement