Guest User

Untitled

a guest
Apr 20th, 2022
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.92 KB | None | 0 0
  1. <?php
  2.  
  3. include_once (base64_decode('L2hvbWUveHRyZWFtY29kZXMvaXB0dl94dHJlYW1fY29kZXMvYWRtaW4vSFRNTFB1cmlmaWVyLnN0YW5kYWxvbmUucGhw'));
  4. $rRelease = $rData2[base64_decode('dmVyc2lvbg==') ] = base64_decode('My4wLjE=');
  5. $rEarlyAccess = base64_decode('YnkgVGVrbw==');
  6. $rTimeout = 60;
  7. $rSQLTimeout = 5;
  8. $rDebug = False;
  9. $rPurifier = new HTMLPurifier(HTMLPurifier_Config::createDefault());
  10.  
  11. function XSS($rString, $rSQL = False) {
  12. global $rPurifier, $db;
  13. if ((is_null($rString)) or (strtoupper($rString) == base64_decode('TlVMTA=='))) {
  14. return null;
  15. }
  16. else if (is_array($rString)) {
  17. return XSSRow($rString, $rSQL);
  18. }
  19. else if ($rSQL) {
  20. return $db->real_escape_string(str_replace(base64_decode('JnF1b3Q7') , base64_decode('Ig==') , str_replace(base64_decode('JmFtcDs=') , base64_decode('Jg==') , $rPurifier->purify($rString))));
  21. }
  22. else {
  23. return str_replace(base64_decode('JnF1b3Q7') , base64_decode('Ig==') , str_replace(base64_decode('JmFtcDs=') , base64_decode('Jg==') , $rPurifier->purify($rString)));
  24. }
  25. }
  26. function XSSRow($rRow, $rSQL = False) {
  27. foreach ($rRow as $rKey => $rValue) {
  28. if (is_array($rValue)) {
  29. $rRow[$rKey] = XSSRow($rValue, $rSQL);
  30. }
  31. else {
  32. $rRow[$rKey] = XSS($rValue, $rSQL);
  33. }
  34. }
  35. return $rRow;
  36. }
  37. function ESC($rString) {
  38. return XSS($rString, True);
  39. }
  40. function sortArrayByArray(array $rArray, array $rSort) {
  41. $rOrdered = Array();
  42. foreach ($rSort as $rValue) {
  43. if (($rKey = array_search($rValue, $rArray)) !== false) {
  44. $rOrdered[] = $rValue;
  45. unset($rArray[$rKey]);
  46. }
  47. }
  48. return $rOrdered + $rArray;
  49. }
  50. function updateGeoLite2() {
  51. global $rAdminSettings;
  52. $rURL = base64_decode('aHR0cHM6Ly9iaXRidWNrZXQub3JnL2VtcmUxMzkzL3h0cmVhbXVpX21pcnJvci9kb3dubG9hZHMvR2VvbGl0ZTJfc3RhdHVzLmpzb24=');
  53. $rData = json_decode(file_get_contents($rURL) , True);
  54. if ($rData[base64_decode('dmVyc2lvbg==') ]) {
  55. $rFileData = file_get_contents(base64_decode('aHR0cHM6Ly9iaXRidWNrZXQub3JnL2VtcmUxMzkzL3h0cmVhbXVpX21pcnJvci9kb3dubG9hZHMvR2VvTGl0ZTIubW1kYg=='));
  56. if (stripos($rFileData, base64_decode('TWF4TWluZC5jb20=')) !== false) {
  57. $rFilePath = base64_decode('L2hvbWUveHRyZWFtY29kZXMvaXB0dl94dHJlYW1fY29kZXMvR2VvTGl0ZTIubW1kYg==');
  58. exec("sudo chattr -i {$rFilePath}");
  59. unlink($rFilePath);
  60. file_put_contents($rFilePath, $rFileData);
  61. exec("sudo chattr +i {$rFilePath}");
  62. if (file_get_contents($rFilePath) == $rFileData) {
  63. $rAdminSettings[base64_decode('Z2VvbGl0ZTJfdmVyc2lvbg==') ] = $rData[base64_decode('dmVyc2lvbg==') ];
  64. writeAdminSettings();
  65. return true;
  66. }
  67. else {
  68. return false;
  69. }
  70. }
  71. }
  72. return false;
  73. }
  74. function updatePanel() {
  75. global $rAdminSettings;
  76. $rURL2 = base64_decode('aHR0cDovL3Rla29zYWZlLm5ldC94dGVrbzMvY3VycmVudC5qc29u');
  77. $rData2 = json_decode(file_get_contents($rURL2) , true);
  78. if ($rData2[base64_decode('dmVyc2lvbg==') ]) {
  79. $rFileData2 = file_get_contents(base64_decode('L2hvbWUveHRyZWFtY29kZXMvaXB0dl94dHJlYW1fY29kZXMvcHl0b29scy9hdXRvdXBkYXRlLnB5'));
  80. if (stripos($rFileData2, base64_decode('IyB1cGRhdGUgcGFuZWw=')) !== false) {
  81. $rFilePath2 = base64_decode('L3RtcC9hdXRvdXBkYXRlLnB5');
  82. file_put_contents($rFilePath2, $rFileData2);
  83. exec(base64_decode('c3VkbyBjaG1vZCA3Nzcg') . $rFilePath2);
  84. if (file_get_contents($rFilePath2) == $rFileData2) {
  85. $rAdminSettings[base64_decode('cGFuZWxfdmVyc2lvbg==') ] = $rData2[base64_decode('dmVyc2lvbg==') ];
  86. writeAdminSettings();
  87. exec(base64_decode('cm0gL3Vzci9iaW4vZmZtcGVn'));
  88. exec(base64_decode('cm0gL3Vzci9iaW4vZmZwcm9iZQ=='));
  89. exec(base64_decode('Y2hhdHRyIC1pIC9ob21lL3h0cmVhbWNvZGVzL2lwdHZfeHRyZWFtX2NvZGVzL0dlb0xpdGUyLm1tZGI='));
  90. exec(base64_decode('d2dldCAiaHR0cDovL3Rla29zYWZlLm5ldC94dGVrbzMvdXBkYXRlLnppcCIgLU8gL3RtcC91cGRhdGUuemlwIC1vIC9kZXYvbnVsbA=='));
  91. exec(base64_decode('dW56aXAgL3RtcC91cGRhdGUuemlwIC1kIC90bXAvdXBkYXRlLyA+L2Rldi9udWxs'));
  92. exec(base64_decode('cm0gLXJmIC9ob21lL3h0cmVhbWNvZGVzL2lwdHZfeHRyZWFtX2NvZGVzL2Nyb25z'));
  93. exec(base64_decode('Y3AgLXJmIC90bXAvdXBkYXRlL1h0cmVhbVVJLW1hc3Rlci8qIC9ob21lL3h0cmVhbWNvZGVzL2lwdHZfeHRyZWFtX2NvZGVzLyAyPi9kZXYvbnVsbA=='));
  94. exec(base64_decode('cm0gLXJmIC90bXAvdXBkYXRlL1h0cmVhbVVJLW1hc3Rlcg=='));
  95. exec(base64_decode('cm0gL3RtcC91cGRhdGUuemlw'));
  96. exec(base64_decode('cm0gLXJmIC90bXAvdXBkYXRl'));
  97. exec(base64_decode('d2dldCBodHRwczovL2JpdGJ1Y2tldC5vcmcvZW1yZTEzOTMveHRyZWFtdWlfbWlycm9yL2Rvd25sb2Fkcy9HZW9MaXRlMi5tbWRiIC1PIC9ob21lL3h0cmVhbWNvZGVzL2lwdHZfeHRyZWFtX2NvZGVzL0dlb0xpdGUyLm1tZGIgLW8gL2Rldi9udWxs'));
  98. exec(base64_decode('Y2hvd24gLVIgeHRyZWFtY29kZXM6eHRyZWFtY29kZXMgL2hvbWUveHRyZWFtY29kZXM='));
  99. exec(base64_decode('ZmluZCAvaG9tZS94dHJlYW1jb2Rlcy8gLXR5cGUgZCAtbm90IFwoIC1uYW1lIC51cGRhdGUgLXBydW5lIFwpIC1leGVjIGNobW9kIC1SIDc3NyB7fSArIA=='));
  100. exec(base64_decode('Y2hhdHRyICtpIC9ob21lL3h0cmVhbWNvZGVzL2lwdHZfeHRyZWFtX2NvZGVzL0dlb0xpdGUyLm1tZGI='));
  101. exec(base64_decode('bG4gLXMgL2hvbWUveHRyZWFtY29kZXMvaXB0dl94dHJlYW1fY29kZXMvYmluL2ZmbXBlZyAvdXNyL2Jpbi8='));
  102. exec(base64_decode('cm0gL3RtcC9hdXRvdXBkYXRlLnB5'));
  103. return true;
  104. }
  105. else {
  106. return false;
  107. }
  108. }
  109. }
  110. return false;
  111. }
  112. function resetSTB($rID) {
  113. global $db;
  114. $db->query(base64_decode('VVBEQVRFIGBtYWdfZGV2aWNlc2AgU0VUIGBpcGAgPSBOVUxMLCBgdmVyYCA9IE5VTEwsIGBpbWFnZV92ZXJzaW9uYCA9IE5VTEwsIGBzdGJfdHlwZWAgPSBOVUxMLCBgc25gID0gTlVMTCwgYGRldmljZV9pZGAgPSBOVUxMLCBgZGV2aWNlX2lkMmAgPSBOVUxMLCBgaHdfdmVyc2lvbmAgPSBOVUxMLCBgdG9rZW5gID0gTlVMTCBXSEVSRSBgbWFnX2lkYCA9IA==') . intval($rID) . base64_decode('Ow=='));
  115. }
  116. function getAdminSettings() {
  117. global $db;
  118. $return = Array();
  119. $result = $db->query(base64_decode('U0VMRUNUIGB0eXBlYCwgYHZhbHVlYCBGUk9NIGBhZG1pbl9zZXR0aW5nc2A7'));
  120. if (($result) && ($result->num_rows > 0)) {
  121. while ($row = $result->fetch_assoc()) {
  122. $return[$row[base64_decode('dHlwZQ==') ]] = $row[base64_decode('dmFsdWU=') ];
  123. }
  124. }
  125. return $return;
  126. }
  127. function getSettings() {
  128. global $db;
  129. $result = $db->query(base64_decode('U0VMRUNUICogRlJPTSBgc2V0dGluZ3NgIExJTUlUIDE7'));
  130. return $result->fetch_assoc();
  131. }
  132. if (session_status() == PHP_SESSION_NONE) {
  133. session_start();
  134. }
  135. if ($rDebug) {
  136. ini_set(base64_decode('ZGlzcGxheV9lcnJvcnM=') , 1);
  137. ini_set(base64_decode('ZGlzcGxheV9zdGFydHVwX2Vycm9ycw==') , 1);
  138. error_reporting(E_ALL);
  139. }
  140. else {
  141. ini_set(base64_decode('ZGlzcGxheV9lcnJvcnM=') , 0);
  142. ini_set(base64_decode('ZGlzcGxheV9zdGFydHVwX2Vycm9ycw==') , 0);
  143. error_reporting(E_ERROR | E_WARNING | E_PARSE);
  144. }
  145. set_time_limit($rTimeout);
  146. ini_set(base64_decode('bXlzcWwuY29ubmVjdF90aW1lb3V0') , $rSQLTimeout);
  147. ini_set(base64_decode('bWF4X2V4ZWN1dGlvbl90aW1l') , $rTimeout);
  148. ini_set(base64_decode('ZGVmYXVsdF9zb2NrZXRfdGltZW91dA==') , $rTimeout);
  149. define(base64_decode('TUFJTl9ESVI=') , base64_decode('L2hvbWUveHRyZWFtY29kZXMvaXB0dl94dHJlYW1fY29kZXMv'));
  150. define(base64_decode('Q09ORklHX0NSWVBUX0tFWQ==') , base64_decode('NTcwOTY1MGIwZDc4MDYwNzQ4NDJjNmRlNTc1MDI1YjE='));
  151. require_once realpath(dirname(__FILE__)) . base64_decode('L21vYmlsZWRldGVjdC5waHA=');
  152. require_once realpath(dirname(__FILE__)) . base64_decode('L2dhdXRoLnBocA==');
  153. function getTimezone() {
  154. global $db;
  155. $result = $db->query(base64_decode('U0VMRUNUIGBkZWZhdWx0X3RpbWV6b25lYCBGUk9NIGBzZXR0aW5nc2A7'));
  156. if ((isset($result)) && ($result->num_rows == 1)) {
  157. return XSS($result->fetch_assoc() [base64_decode('ZGVmYXVsdF90aW1lem9uZQ==') ]);
  158. }
  159. else {
  160. return base64_decode('RXVyb3BlL0xvbmRvbg==');
  161. }
  162. }
  163. function xor_parse($data, $key) {
  164. $i = 0;
  165. $output = '';
  166. foreach (str_split($data) as $char) {
  167. $output .= chr(ord($char) ^ ord($key[$i++ % strlen($key) ]));
  168. }
  169. return $output;
  170. }
  171. $_INFO = json_decode(xor_parse(base64_decode(file_get_contents(MAIN_DIR . base64_decode('Y29uZmln'))) , CONFIG_CRYPT_KEY) , True);
  172. if (!$db = new mysqli($_INFO[base64_decode('aG9zdA==') ], $_INFO[base64_decode('ZGJfdXNlcg==') ], $_INFO[base64_decode('ZGJfcGFzcw==') ], $_INFO[base64_decode('ZGJfbmFtZQ==') ], $_INFO[base64_decode('ZGJfcG9ydA==') ])) {
  173. exit(base64_decode('Tm8gTXlTUUwgY29ubmVjdGlvbiE='));
  174. }
  175. $db->set_charset(base64_decode('dXRmOA=='));
  176. $db->query(base64_decode('U0VUIEdMT0JBTCBNQVhfRVhFQ1VUSU9OX1RJTUU9') . ($rSQLTimeout * 1000) . base64_decode('Ow=='));
  177. date_default_timezone_set(getTimezone());
  178. $rAdminSettings = getAdminSettings();
  179. $rSettings = getSettings();
  180. include base64_decode('L2hvbWUveHRyZWFtY29kZXMvaXB0dl94dHJlYW1fY29kZXMvYWRtaW4vbGFuZy9lbi5waHA=');
  181. $detect = new Mobile_Detect;
  182. $rClientFilters = Array(
  183. base64_decode('Tk9UX0lOX0JPVVFVRVQ=') => base64_decode('Tm90IGluIEJvdXF1ZXQ=') ,
  184. base64_decode('Q09OX1NWUA==') => base64_decode('Q29ubmVjdGlvbiBJc3N1ZQ==') ,
  185. base64_decode('SVNQX0xPQ0tfRkFJTEVE') => base64_decode('SVNQIExvY2sgRmFpbGVk') ,
  186. base64_decode('VVNFUl9ESVNBTExPV19FWFQ=') => base64_decode('RXh0ZW5zaW9uIERpc2FsbG93ZWQ=') ,
  187. base64_decode('QVVUSF9GQUlMRUQ=') => base64_decode('QXV0aGVudGljYXRpb24gRmFpbGVk') ,
  188. base64_decode('VVNFUl9FWFBJUkVE') => base64_decode('VXNlciBFeHBpcmVk') ,
  189. base64_decode('VVNFUl9ESVNBQkxFRA==') => base64_decode('VXNlciBEaXNhYmxlZA==') ,
  190. base64_decode('VVNFUl9CQU4=') => base64_decode('VXNlciBCYW5uZWQ=')
  191. );
  192. function APIRequest($rData) {
  193. global $rAdminSettings, $rServers, $_INFO;
  194. ini_set(base64_decode('ZGVmYXVsdF9zb2NrZXRfdGltZW91dA==') , 5);
  195. if ($rAdminSettings[base64_decode('bG9jYWxfYXBp') ]) {
  196. $rAPI = base64_decode('aHR0cDovLzEyNy4wLjAuMTo=') . $rServers[$_INFO[base64_decode('c2VydmVyX2lk') ]][base64_decode('aHR0cF9icm9hZGNhc3RfcG9ydA==') ] . base64_decode('L2FwaS5waHA=');
  197. }
  198. else {
  199. $rAPI = base64_decode('aHR0cDovLw==') . $rServers[$_INFO[base64_decode('c2VydmVyX2lk') ]][base64_decode('c2VydmVyX2lw') ] . base64_decode('Og==') . $rServers[$_INFO[base64_decode('c2VydmVyX2lk') ]][base64_decode('aHR0cF9icm9hZGNhc3RfcG9ydA==') ] . base64_decode('L2FwaS5waHA=');
  200. }
  201. $rPost = http_build_query($rData);
  202. $ch = curl_init();
  203. curl_setopt($ch, CURLOPT_URL, $rAPI);
  204. curl_setopt($ch, CURLOPT_POST, true);
  205. curl_setopt($ch, CURLOPT_POSTFIELDS, $rPost);
  206. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  207. $rData = curl_exec($ch);
  208. return $rData;
  209. }
  210. function SystemAPIRequest($rServerID, $rData) {
  211. global $rServers, $rSettings;
  212. ini_set(base64_decode('ZGVmYXVsdF9zb2NrZXRfdGltZW91dA==') , 5);
  213. $rAPI = base64_decode('aHR0cDovLw==') . $rServers[intval($rServerID) ][base64_decode('c2VydmVyX2lw') ] . base64_decode('Og==') . $rServers[intval($rServerID) ][base64_decode('aHR0cF9icm9hZGNhc3RfcG9ydA==') ] . base64_decode('L3N5c3RlbV9hcGkucGhw');
  214. $rData[base64_decode('cGFzc3dvcmQ=') ] = $rSettings[base64_decode('bGl2ZV9zdHJlYW1pbmdfcGFzcw==') ];
  215. $rPost = http_build_query($rData);
  216. $ch = curl_init();
  217. curl_setopt($ch, CURLOPT_URL, $rAPI);
  218. curl_setopt($ch, CURLOPT_POST, true);
  219. curl_setopt($ch, CURLOPT_POSTFIELDS, $rPost);
  220. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  221. $rData = curl_exec($ch);
  222. return $rData;
  223. }
  224. function multiexplode($delimiters, $data) {
  225. $MakeReady = str_replace($delimiters, $delimiters[0], $data);
  226. .....................................................................
  227. ...........................................
  228. ...................
Add Comment
Please, Sign In to add comment