Guest User

Untitled

a guest
Jul 5th, 2020
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.21 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.0
  8. * @ Author : DeZender
  9. * @ Release on : 15.05.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function render_check_license()
  15. {
  16. global $limitMaxCalls;
  17. global $maxCallsPeak;
  18. global $maxCallsExceeded;
  19. global $maxCallsExceeded_days;
  20. global $missingCallStats;
  21. global $incompleteCallStats;
  22. global $keyInvalid;
  23. global $keyExpired;
  24. global $errorWriteLicenseKey;
  25. error_reporting(32759);
  26. echo '<html>' . "\r\n" . '<head>' . "\r\n" . ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\r\n" . ' <title>';
  27. global $APP_NAME;
  28. echo $APP_NAME;
  29. echo ' check licence</title>' . "\r\n" . ' <meta name="keywords" content="VoIP, recorder, monitoring, quality, qos, ITU-T G.107, linux, sniffer, packet capture, SIP, RTP, latency, jitter" />' . "\r\n" . ' <meta name="description" content="';
  30. global $APP_NAME;
  31. echo $APP_NAME;
  32. echo ' is open source live network packet sniffer voip monitoring tool and call recorder which analyzes SIP and RTP protocol and predicts call quality" />' . "\r\n" . ' <meta name="author" content="Martin Vit" />' . "\r\n" . ' <meta name="robots" content="index,follow" />' . "\r\n" . ' <link rel="shortcut icon" type="image/x-icon" href="';
  33. echo Handle_favicon();
  34. echo '" />' . "\r\n" . ' <link href="css/style.css" rel="stylesheet" type="text/css" media="screen">' . "\r\n" . '</head>' . "\r\n" . '<body>' . "\r\n" . ' <header>' . "\r\n\t" . '<a href="/" class="logo"><img src="images/';
  35. echo Get_brand_logo();
  36. echo '" alt="';
  37. global $APP_NAME;
  38. echo $APP_NAME;
  39. echo '" /></a>' . "\r\n" . ' </header>' . "\r\n" . ' <section>' . "\r\n\t" . '<article>' . "\r\n\t" . '<!-- [1] content -->' . "\r\n\t" . '<h1> ';
  40. global $APP_NAME;
  41. echo $APP_NAME;
  42. echo ' - check license </h1>' . "\r\n";
  43.  
  44. if ($missingCallStats) {
  45. echo 'Missing license check.';
  46. }
  47. else if ($incompleteCallStats) {
  48. echo 'The license check is older than 24 hours. Check your cron configuration.';
  49. }
  50. else if ($keyInvalid) {
  51. echo 'Invalid license key.';
  52. }
  53. else if ($keyExpired) {
  54. echo 'This version cannot be used with the license key.php - license is valid for versions <= ' . $keyExpired . '. ' . 'Please contact the support and enter new license key.';
  55. }
  56. else {
  57. echo 'Number of concurrent calls was exceeded. ' . ('The average peak is ' . $maxCallsPeak . ' calls and the limit for this license is ' . $limitMaxCalls . '. ') . 'Please contact the support and enter new license key.';
  58. }
  59.  
  60. echo '<br><br>';
  61. echo '<form action="./admin.php" method="post">';
  62. echo '<table border=1 style="width: 800px;border-collapse: collapse; padding: 5px;">';
  63. $dir = dirname(__FILE__);
  64. if ($missingCallStats || $incompleteCallStats) {
  65. echo '<tr><td>run license check</td><td style="color: red;">run in linux:<br><br>php ' . $dir . '/php/run.php saveCallStatistics' . '</td></tr>';
  66. echo '</table><br>';
  67. echo '<button type="post" class="button button-blue">Recheck</button>';
  68. echo '<input type="submit" name="unblock" value="try run licence check" class="button button-blue">';
  69. }
  70. else {
  71. echo '<tr><td style="padding-right: 20px;">license&nbsp;key</td>';
  72. echo '<td>';
  73. echo '<table cellpadding=0 cellspacing=0>';
  74. $SITE = Get_brand_sitename();
  75. $licensekeyUrl = Get_brand_get_licensekey_url();
  76.  
  77. if ($licensekeyUrl) {
  78. $hwid = NULL;
  79. exec('bin/hwid-' . php_uname('m'), $output_hwid, $return_var_hwid);
  80. if (count($output_hwid) && preg_match('/hardware id:(?P<hwid>.*)/', $output_hwid[0], $match_hwid)) {
  81. $hwid = $match_hwid['hwid'];
  82. }
  83.  
  84. echo '<tr><td colspan=2 style="padding: 1px; padding-right: 20px;">' . ('<p style="color:black; word-wrap: break-word; white-space: normal; width: 550;">your server id is: ' . $hwid) . '</td></tr><tr>';
  85. echo '<td colspan=2 style="padding: 1px;"><br><h2>If you do not have account yet please create one on:</h2><a target="_blank" href="https://' . $SITE . '/getfreetrial" class="button button-blue" style="float: right; margin-right: 20px; padding: 4px 7px 5px 7px;">register</a><br><br>' . '</td></tr><tr>';
  86. echo '<td colspan=2 style="padding: 1px;"><br><h2>If you have already your license token insert it here</h2></td></tr><tr><td colspan=2 style="padding: 1px;"><span id="licensekey_alert" style="color: red; font-weight: bold;"></span></td></tr><tr><td style="padding: 1px; color: black;">license token:</td><td style="padding: 1px; padding-right: 20px; width: 470px;"><input type="text" name="license_token" id="license_token" value="' . (!empty($_POST['license_token']) ? $_POST['license_token'] : get_first_item('select content from system where type = \'license_token\'')) . '" style="width: 100%;">' . '</td></tr><tr>' . '<td colspan=2 style="padding: 1px; padding-top: 5px;">' . '<a target="_blank" onclick="getlicense(false, true)" class="button button-blue" style="float: right; margin-right: 20px; padding: 4px 7px 5px 7px;">get license key</a><br><br>' . '</td></tr><tr>';
  87. echo '<td colspan=2 style="padding: 1px;"><br><h2 style="padding-right: 20px;">If your machine does not have access to internet please paste your license key which you can get from:</h2><a target="_blank" href="http://' . $SITE . '/whmcs/clientarea.php?action=products" class="button button-blue" style="float: right; margin-right: 20px; padding: 4px 7px 5px 7px;">download license</a><br><br>' . '</td></tr>';
  88. }
  89.  
  90. echo '<tr><td style="padding: 1px; color: black;">license key:</td><td style="padding: 1px; padding-right: 20px;"><textarea rows=6 name="licensekey" id="licensekey" style="width: 100%;">' . htmlspecialchars($_POST['licensekey']) . '</textarea>' . '</td></tr>';
  91.  
  92. if (!empty($errorWriteLicenseKey)) {
  93. echo '<tr><td></td><td style="color: red; width: 470px; font-size: 90%;">Cannot write ' . dirname(__FILE__) . '/key.php file.<br>' . 'Please login to the machine via ssh (root) and run:<br>' . 'chown -R ' . get_www_user() . ' ' . dirname(__FILE__) . '<br>' . '</td></tr>';
  94. }
  95.  
  96. echo '</table>';
  97.  
  98. if ($licensekeyUrl) {
  99. echo '<script type="text/javascript">' . "\r\n\t\t\t\t" . 'function getlicense(useWget, tryWget) {' . "\r\n\t\t\t\t\t" . 'getlicense_alert("");' . "\r\n\t\t\t\t\t" . 'var elLicenseToken = document.getElementById("license_token");' . "\r\n\t\t\t\t\t" . 'if(!elLicenseToken.value) {' . "\r\n\t\t\t\t\t\t" . 'getlicense_alert("missing license token");' . "\r\n\t\t\t\t\t\t" . 'return;' . "\r\n\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t" . 'var elLicenseKey = document.getElementById("licensekey");' . "\r\n\t\t\t\t\t" . 'var xmlhttp;' . "\r\n\t\t\t\t\t" . 'if(window.XMLHttpRequest) {' . "\r\n\t\t\t\t\t\t" . 'xmlhttp = new XMLHttpRequest();' . "\r\n\t\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t\t" . 'xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");' . "\r\n\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t" . 'xmlhttp.onreadystatechange = function() {' . "\r\n\t\t\t\t\t\t" . 'if(xmlhttp.readyState == 4) {' . "\r\n\t\t\t\t\t\t\t" . 'if(xmlhttp.status == 200) {' . "\r\n\t\t\t\t\t\t\t\t" . 'result = JSON.parse(xmlhttp.responseText);' . "\r\n\t\t\t\t\t\t\t\t" . 'if(!result) {' . "\r\n\t\t\t\t\t\t\t\t\t" . 'getlicense_alert("unknown response");' . "\r\n\t\t\t\t\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t\t\t\t\t" . 'if(result.success) {' . "\r\n\t\t\t\t\t\t\t\t\t\t" . 'elLicenseKey.value = result.key;' . "\r\n\t\t\t\t\t\t\t\t\t\t" . 'var recheckButton = document.getElementById("submit_button");' . "\r\n\t\t\t\t\t\t\t\t\t\t" . 'if(recheckButton) {' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . 'recheckButton.click();' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t\t\t\t\t\t" . 'getlicense_alert(result.error);' . "\r\n\t\t\t\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t\t\t\t" . 'if(xmlhttp.statusText) {' . "\r\n\t\t\t\t\t\t\t\t\t" . 'getlicense_alert(xmlhttp.statusText);' . "\r\n\t\t\t\t\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t\t\t\t\t" . 'getlicense_alert("unknown error");' . "\r\n\t\t\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t\t\t\t" . 'if(!useWget && tryWget) {' . "\r\n\t\t\t\t\t\t\t\t\t" . 'getlicense(true);' . "\r\n\t\t\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t" . 'if(useWget) {' . "\r\n\t\t\t\t\t\t" . 'xmlhttp.open("POST", "php/lib/functions_open.php", true);' . "\r\n\t\t\t\t\t\t" . 'xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");' . "\r\n\t\t\t\t\t\t" . 'xmlhttp.send("function_open_task=wget_license" +' . "\r\n\t\t\t\t\t\t\t" . ' "&licensetoken=" + encodeURIComponent(elLicenseToken.value.trim()) +' . "\r\n\t\t\t\t\t\t\t" . ' "&hwid=" + "' . urlencode($hwid) . '");' . "\r\n\t\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t\t" . 'xmlhttp.open("POST", "' . $licensekeyUrl . '", true);' . "\r\n\t\t\t\t\t\t" . 'xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");' . "\r\n\t\t\t\t\t\t" . 'xmlhttp.send("licensetoken=" + encodeURIComponent(elLicenseToken.value.trim()) +' . "\r\n\t\t\t\t\t\t\t" . ' "&hwid=" + "' . urlencode($hwid) . '");' . "\r\n\t\t\t\t\t" . '}' . "\r\n\t\t\t\t" . '}' . "\r\n\t\t\t\t" . 'function getlicense_alert(text) {' . "\r\n\t\t\t\t\t" . 'var elLicenseKeyAlert = document.getElementById("licensekey_alert");' . "\r\n\t\t\t\t\t" . 'elLicenseKeyAlert.innerHTML = text;' . "\r\n\t\t\t\t" . '}' . "\r\n\t\t\t" . ' </script>';
  100. }
  101.  
  102. echo '</table><br>';
  103. echo '<button type="post" id="submit_button" class="button button-blue">Submit</button>';
  104. echo '<input type="submit" name="unblock" value="try unblock" class="button button-blue" style="margin-left: 2px;">';
  105. }
  106.  
  107. echo "\t" . '<!-- [2] content -->' . "\r\n\t" . '</article>' . "\r\n" . ' </section>' . "\r\n" . ' <footer>' . "\r\n" . ' </footer>' . "\r\n" . ' </body>' . "\r\n" . '</html>' . "\r\n";
  108. }
  109.  
  110. function render_cloud_max_calls_exceeded()
  111. {
  112. global $limitMaxCalls;
  113. global $maxCallsPeak;
  114. global $maxCallsExceeded;
  115. global $maxCallsExceeded_days;
  116. error_reporting(32759);
  117. echo '<html>' . "\r\n" . '<head>' . "\r\n" . ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\r\n" . ' <title>';
  118. global $APP_NAME;
  119. echo $APP_NAME;
  120. echo ' check licence</title>' . "\r\n" . ' <meta name="keywords" content="VoIP, recorder, monitoring, quality, qos, ITU-T G.107, linux, sniffer, packet capture, SIP, RTP, latency, jitter" />' . "\r\n" . ' <meta name="description" content="';
  121. global $APP_NAME;
  122. echo $APP_NAME;
  123. echo ' is open source live network packet sniffer voip monitoring tool and call recorder which analyzes SIP and RTP protocol and predicts call quality" />' . "\r\n" . ' <meta name="author" content="Martin Vit" />' . "\r\n" . ' <meta name="robots" content="index,follow" />' . "\r\n" . ' <link rel="shortcut icon" type="image/x-icon" href="';
  124. echo Handle_favicon();
  125. echo '" />' . "\r\n" . ' <link href="css/style.css" rel="stylesheet" type="text/css" media="screen">' . "\r\n" . '</head>' . "\r\n" . '<body>' . "\r\n" . ' <header>' . "\r\n\t" . '<a href="/" class="logo"><img src="images/';
  126. echo Get_brand_logo();
  127. echo '" alt="';
  128. global $APP_NAME;
  129. echo $APP_NAME;
  130. echo '" /></a>' . "\r\n" . ' </header>' . "\r\n" . ' <section>' . "\r\n\t" . '<article>' . "\r\n\t" . '<!-- [1] content -->' . "\r\n\t" . '<h1> ';
  131. global $APP_NAME;
  132. echo $APP_NAME;
  133. echo ' - check license </h1>' . "\r\n";
  134. echo 'Number of concurrent calls was exceeded. ' . ('The average peak is ' . $maxCallsPeak . ' calls and the limit for this license is ' . $limitMaxCalls . '. ') . 'Please contact the support.';
  135. echo "\t" . '<!-- [2] content -->' . "\r\n\t" . '</article>' . "\r\n" . ' </section>' . "\r\n" . ' <footer>' . "\r\n" . ' </footer>' . "\r\n" . ' </body>' . "\r\n" . '</html>' . "\r\n";
  136. }
  137.  
  138. function check_base()
  139. {
  140. $arch = php_uname('m');
  141. return (function_exists('mysql_connect') || function_exists('mysqli_connect')) && ((getPhpVersion() < 502) || function_exists('json_encode')) && function_exists('gd_info') && function_exists('mb_strlen') && function_exists('posix_getpwuid') && (function_exists('gzdecode') || function_exists('gzinflate')) && exists_is_set_executable_bin_util('phantomjs') && exists_is_set_executable_bin_util('sox') && exists_is_set_executable_bin_util('tshark') && exists_is_set_executable_bin_util('mergecap') && exists_is_set_executable_bin_util('t38_decode') && (!file_exists('bin/mscgen-' . $arch) || is_set_executable('bin/mscgen-' . $arch)) && (!file_exists('bin/charts-' . $arch) || is_set_executable('bin/charts-' . $arch)) && ((file_exists('bin/vm-' . $arch) && is_set_executable('bin/vm-' . $arch)) || (file_exists('bin/vm') && is_set_executable('bin/vm')) || !in_array($arch, ['i686', 'x86_64'])) && (!file_exists('bin/vmcodecs') || is_set_executable('bin/vmcodecs')) && check_fonts();
  142. }
  143.  
  144. function check_fonts()
  145. {
  146. return file_exists('/usr/share/fonts/default/Type1') || file_exists('/usr/share/fonts/ghostscript') || file_exists('/usr/share/fonts/type1/gsfonts') || file_exists('/usr/share/fonts/urw-fonts') || file_exists('/usr/share/fonts/urw-base35');
  147. }
  148.  
  149. function is_set_executable($file)
  150. {
  151. if (is_executable($file)) {
  152. return true;
  153. }
  154.  
  155. exec('chmod +x ' . escapeshellarg($file));
  156. return is_executable($file);
  157. ....................................................................
  158. .................................
  159. ...........
Add Comment
Please, Sign In to add comment