Guest User

Untitled

a guest
Oct 25th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 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. include 'functions.php';
  15. set_time_limit(0);
  16. ini_set('default_socket_timeout', 15);
  17. ini_set('memory_limit', -1);
  18. if (isset($argv[1]) && (strtoupper($argv[1]) == 'START')) {
  19. gc_enable();
  20. $rWait = 10000;
  21. $rFailWait = 15;
  22. $rKeyWait = 5;
  23. if (isset($argv[2]) && (strlen($argv[2]) == 32)) {
  24. $rChannel = $argv[2];
  25. plog('Shutting down previous instances.');
  26. exec('kill -9 `ps -ef | grep \'DRM_' . $rChannel . '\' | grep -v grep | awk \'{print $2}\'`');
  27. cli_set_process_title('DRM_' . $rChannel);
  28. $rDatabase = deleteCache($rChannel);
  29. $rDatabase = setCache($rDatabase, 'php_pid', getmypid());
  30. saveCache($rChannel, $rDatabase);
  31.  
  32. while (true) {
  33. plog('Starting: ' . $rChannel);
  34. plog('Killing directory if exists.');
  35. exec('rm -rf ' . MAIN_DIR . 'video/' . $rChannel);
  36. exec('rm -rf ' . MAIN_DIR . 'hls/' . $rChannel);
  37. $rDatabase = setCache($rDatabase, 'php_pid', getmypid());
  38. saveCache($rChannel, $rDatabase);
  39. plog('Creating new directory.');
  40. mkdir(MAIN_DIR . 'video/' . $rChannel);
  41. mkdir(MAIN_DIR . 'video/' . $rChannel . '/aria');
  42. mkdir(MAIN_DIR . 'video/' . $rChannel . '/decrypted');
  43. mkdir(MAIN_DIR . 'video/' . $rChannel . '/encrypted');
  44. mkdir(MAIN_DIR . 'video/' . $rChannel . '/final');
  45. mkdir(MAIN_DIR . 'hls/' . $rChannel);
  46. mkdir(MAIN_DIR . 'hls/' . $rChannel . '/hls');
  47. plog('Grabbing DASH playlist.');
  48. $rData = getBellChannel($rChannel);
  49.  
  50. if ($rData['status']) {
  51. $rChannelData = $rData['data'];
  52. }
  53. else {
  54. $rChannelData = NULL;
  55. }
  56.  
  57. unset($rData);
  58.  
  59. if ($rChannelData) {
  60. $rStarted = false;
  61. $rMemoryUsage = 0;
  62. $rFFPID = NULL;
  63. $rStreamInfo = NULL;
  64.  
  65. while (true) {
  66. plog('Start loop handler.');
  67. $rMemoryUsage = memory_get_usage();
  68. plog('Memory usage: ' . round($rMemoryUsage / 1024 / 1024, 2) . ' MB');
  69. plog('DRM Processes: ' . getProcessCount());
  70. $rKeyFail = false;
  71. $rStart = round(microtime(true) * 1000);
  72.  
  73. if (!is_dir(MAIN_DIR . 'video/' . $rChannel . '/final')) {
  74. plog('Force stopped.');
  75. break;
  76. }
  77.  
  78. plog('Fetching segments...');
  79. $rSegments = getBellSegments($rChannelData, $rConfig['segments_bell']);
  80. if ($rSegments && (0 < strlen($rSegments['video']))) {
  81. $rKeys = getKeyCache(md5($rSegments['video']));
  82. ......................................................................
  83. ........................................
  84. ...............
Add Comment
Please, Sign In to add comment