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
- *
- */
- include 'functions.php';
- set_time_limit(0);
- ini_set('default_socket_timeout', 15);
- ini_set('memory_limit', -1);
- if (isset($argv[1]) && (strtoupper($argv[1]) == 'START')) {
- gc_enable();
- $rWait = 10000;
- $rFailWait = 15;
- $rKeyWait = 5;
- if (isset($argv[2]) && (strlen($argv[2]) == 32)) {
- $rChannel = $argv[2];
- plog('Shutting down previous instances.');
- exec('kill -9 `ps -ef | grep \'DRM_' . $rChannel . '\' | grep -v grep | awk \'{print $2}\'`');
- cli_set_process_title('DRM_' . $rChannel);
- $rDatabase = deleteCache($rChannel);
- $rDatabase = setCache($rDatabase, 'php_pid', getmypid());
- saveCache($rChannel, $rDatabase);
- while (true) {
- plog('Starting: ' . $rChannel);
- $rSegmentCache = [];
- plog('Killing directory if exists.');
- exec('rm -rf ' . MAIN_DIR . 'video/' . $rChannel);
- exec('rm -rf ' . MAIN_DIR . 'hls/' . $rChannel);
- plog('Creating new directory.');
- mkdir(MAIN_DIR . 'video/' . $rChannel);
- mkdir(MAIN_DIR . 'video/' . $rChannel . '/aria');
- mkdir(MAIN_DIR . 'video/' . $rChannel . '/decrypted');
- mkdir(MAIN_DIR . 'video/' . $rChannel . '/encrypted');
- mkdir(MAIN_DIR . 'video/' . $rChannel . '/final');
- mkdir(MAIN_DIR . 'video/' . $rChannel . '/cache');
- mkdir(MAIN_DIR . 'hls/' . $rChannel);
- mkdir(MAIN_DIR . 'hls/' . $rChannel . '/hls');
- $rStarted = false;
- $rFFPID = NULL;
- $rStreamInfo = NULL;
- $rMemoryUsage = 0;
- $rPreviousID = 0;
- $rMPDs = [];
- while (true) {
- plog('Start loop handler.');
- $rMemoryUsage = memory_get_usage();
- plog('Memory usage: ' . round($rMemoryUsage) . ' bytes');
- plog('DRM Processes: ' . getProcessCount());
- $rKeyFail = false;
- $rStart = round(microtime(true) * 1000);
- if (!is_dir(MAIN_DIR . 'video/' . $rChannel . '/final')) {
- plog('Force stopped.');
- break;
- }
- $rTime = time();
- $rCurrentMPD = NULL;
- foreach (range(0, count($rMPDs) - 1) as $i) {
- if (($rMPDs[$i]['start'] <= $rTime) && ($rTime < $rMPDs[$i]['finish'])) {
- $rCurrentMPD = $i;
- }
- }
- if ((0 < $rCurrentMPD) || !isset($rCurrentMPD)) {
- $rCurrentMPD = 0;
- $rScheduleID = NULL;
- $rMPDs = [];
- foreach (range(1, 2) as $rMPDID) {
- plog('Fetching MPD ' . $rMPDID . '...');
- if (!$rScheduleID) {
- $rScheduleID = 'now';
- }
- $rMPDInfo = json_decode(getURL('http://cbd46b77.cdn.cms.movetv.com/cms/api/channels/' . $rChannel . '/schedule/' . $rScheduleID . '/playback_info.qvt'), true);
- $rManifestURL = $rMPDInfo['playback_info']['dash_manifest_url'];
- plog('Manifest: ' . $rManifestURL);
- $rData = NULL;
- ..............................................................
- .........................................
- ................
Add Comment
Please, Sign In to add comment