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
 - *
 - */
 - function plog($rText)
 - {
 - echo '[' . date('Y-m-d h:i:s') . '] ' . $rText . "\n";
 - }
 - function getProcessCount()
 - {
 - exec('pgrep -u mini_cs | wc -l 2>&1', $rOutput, $rRet);
 - return intval($rOutput[0]);
 - }
 - function getKeyCache($rKey)
 - {
 - if (file_exists(MAIN_DIR . 'cache/keystore/' . $rKey . '.key')) {
 - return file_get_contents(MAIN_DIR . 'cache/keystore/' . $rKey . '.key');
 - }
 - return NULL;
 - }
 - function setKeyCache($rKey, $rValue)
 - {
 - file_put_contents(MAIN_DIR . 'cache/keystore/' . $rKey . '.key', $rValue);
 - if (file_exists(MAIN_DIR . 'cache/keystore/' . $rKey . '.key')) {
 - return true;
 - }
 - return false;
 - }
 - function openCache($rChannel)
 - {
 - if (file_exists(MAIN_DIR . 'cache/' . $rChannel . '.db')) {
 - return json_decode(file_get_contents(MAIN_DIR . 'cache/' . $rChannel . '.db'), true);
 - }
 - return [];
 - }
 - function deleteCache($rChannel)
 - {
 - if (file_exists(MAIN_DIR . 'cache/' . $rChannel . '.db')) {
 - unlink(MAIN_DIR . 'cache/' . $rChannel . '.db');
 - }
 - return [];
 - }
 - function clearCache($rDatabase, $rID)
 - {
 - unset($rDatabase[$rID]);
 - return $rDatabase;
 - }
 - function getCache($rDatabase, $rID)
 - {
 - if (isset($rDatabase[$rID])) {
 - return $rDatabase[$rID]['value'];
 - }
 - return NULL;
 - }
 - function setCache($rDatabase, $rID, $rValue)
 - {
 - global $rCacheTime;
 - $rDatabase[$rID] = ['value' => $rValue, 'expires' => time() + $rCacheTime];
 - return $rDatabase;
 - }
 - function saveCache($rChannel, $rDatabase)
 - {
 - file_put_contents(MAIN_DIR . 'cache/' . $rChannel . '.db', json_encode($rDatabase));
 - }
 - function getPersistence()
 - {
 - if (file_exists(MAIN_DIR . 'config/persistence.db')) {
 - $rPersistence = json_decode(file_get_contents(MAIN_DIR . 'config/persistence.db'), true);
 - }
 - else {
 - $rPersistence = [];
 - }
 - return $rPersistence;
 - }
 - function addPersistence($rScript, $rChannel)
 - {
 - $rPersistence = getpersistence();
 - if (!in_array($rChannel, $rPersistence[$rScript])) {
 - $rPersistence[$rScript][] = $rChannel;
 - }
 - file_put_contents(MAIN_DIR . 'config/persistence.db', json_encode($rPersistence));
 - }
 - function removePersistence($rScript, $rChannel)
 - {
 - $rPersistence = getpersistence();
 - if (($rKey = array_search($rChannel, $rPersistence[$rScript])) !== false) {
 - unset($rPersistence[$rScript][$rKey]);
 - .................................................................
 - ..................................
 - ............
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment