CHERTS

Decode file netcat/connect_io.php

Dec 28th, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.53 KB | None | 0 0
  1. <?php
  2.  
  3. if (!isset($NETCAT_FOLDER)) {
  4.     $NETCAT_FOLDER = realpath(dirname(__FILE__) . '/..') . DIRECTORY_SEPARATOR;
  5. }
  6.  
  7. // unset for security reasons
  8. $SYSTEM_FOLDER = "";
  9. // connect config file
  10. @include_once($NETCAT_FOLDER . "vars.inc.php");
  11.  
  12. // if vars.inc.php not updated set default value for $SYSTEM_FOLDER
  13. if (!$SYSTEM_FOLDER) {
  14.     global $SYSTEM_FOLDER;
  15.     $SYSTEM_FOLDER = $ROOT_FOLDER . "system/";
  16. }
  17.  
  18. // PHP version must be >= 5.2
  19. if (version_compare(phpversion(), '5.2', '<')) {
  20.     echo "<b style='color:#A00'>PHP 5.2 or higher required!</b>";
  21.     exit;
  22. }
  23.  
  24. // short_open_tag must be on
  25. if (!ini_get('short_open_tag')) {
  26.     echo "<b style='color:#A00'>short_open_tag value must be on!</b>";
  27.     exit;
  28. }
  29.  
  30. // include all new system classes and get nc_core object
  31. require_once($INCLUDE_FOLDER . "unicode.inc.php");
  32. require_once($SYSTEM_FOLDER . "index.php");
  33.  
  34. // set db for compatibility
  35. $db = $nc_core->db;
  36. function nc_demo_evaluation_form() {
  37. //    global $nc_core;
  38. //
  39. //      echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional'>
  40. //      <html>
  41. //      <head>
  42. //      <meta http-equiv='content-type' content='text/html; charset=" . $nc_core->NC_CHARSET . "'/>
  43. //      <link type='text/css' rel='Stylesheet' href='" . $nc_core->ADMIN_TEMPLATE . "css/login.css'>
  44. //      <link type='text/css' rel='Stylesheet' href='" . $nc_core->ADMIN_TEMPLATE . "css/style.css'>
  45. //      <title>Система управления сайтами NetCat</title>
  46. //      </head>
  47. //      <body>
  48. //              <div class='login_wrap'>
  49. //              <div class='top_line'>
  50. //                      <div class='logo'><a href='#'><img src='" . $nc_core->ADMIN_TEMPLATE . "img/logo.png' alt='NetCat CMS' /></a></div>
  51. //                      <div class='top_text'><a href='http://www.netcat.ru'>NetCat</a></div>
  52. //              </div>
  53. //              <div class='content' align='center'>
  54. //                      <font size='+1' style='line-height: 1.5em'>Период знакомства с демонстрационной версией окончен.<br />
  55. //                              Вы хотите продолжить работу с NetCat?<br/>
  56. //                              Просто <a href='" . $nc_core->ADMIN_PATH . "patch/activation.php?not_ia=1'>активируйте</a> эту копию.<br /><br />
  57. //                      </font>
  58. //              </div>
  59. //              </div>
  60. //              <div class='bottom_line'>
  61. //                      <div class='left'>&copy; 1999&#8212;" . date("Y") . "
  62. //                      <a href='http://www.netcat.ru'>Система управления сайтами NetCat</a>
  63. //                      </div>
  64. //              </div>
  65. //      </body>
  66. //      </html>";
  67. }
  68.  
  69. function nc_demo_expired() {
  70. //    global $nc_core, $db;
  71. //
  72. //    if ( strstr($_SERVER['REQUEST_URI'], 'patch/activation.php') ) return 0;
  73. //
  74. //    $r = 0;
  75. //    $inst_id = $nc_core->get_settings('InstallationID');
  76. //    $inst_date_out = $nc_core->get_settings('InstallationDateOut');
  77. //
  78. //    if (!$inst_id || !$inst_date_out) $r = 1;
  79. //
  80. //    if ( $inst_id != sha1("Net_^^_Cat".$inst_date_out."nc29488555299dc8519a999c13c6a9dc17e58e5ed4431f672b18ac4a6371f511ef325".substr($inst_date_out,7,3)) ) $r = 1;
  81. //
  82. //    $now_date = mktime(0, 0, 0, date("n"), date("j"), date("Y")); $inst_date_out = strtotime($inst_date_out);
  83. //
  84. //    if ($inst_date_out < $now_date) $r = 1;
  85. //
  86. //    if ($r) {
  87. //              nc_demo_evaluation_form();
  88. //              exit;
  89. //      }
  90. }
  91.  
  92. nc_demo_expired();
Advertisement
Add Comment
Please, Sign In to add comment