Advertisement
daydiff

decoder

Jul 3rd, 2014
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.41 KB | None | 0 0
  1. <?php
  2. $decode_funcs = array(
  3.     '_527006668' => array (
  4.   0 => '_TRUSTLINK_USER',
  5.   1 => '_TRUSTLINK_USER',
  6.   2 => '0a70cdb962f17a3f437983921fa02647',
  7.   3 => '',
  8.   4 => 'host',
  9.   5 => 'host',
  10.   6 => 'use_server_array',
  11.   7 => 'use_server_array',
  12.   8 => 'HTTP_HOST',
  13.   9 => '/^http:\\/\\//',
  14.   10 => '',
  15.   11 => '/^www\\./',
  16.   12 => '',
  17.   13 => 'request_uri',
  18.   14 => 'request_uri',
  19.   15 => 'request_uri',
  20.   16 => 'REQUEST_URI',
  21.   17 => 'REQUEST_URI',
  22.   18 => 'multi_site',
  23.   19 => 'multi_site',
  24.   20 => 'debug',
  25.   21 => 'debug',
  26.   22 => 'trustlink_cookie',
  27.   23 => 'trustlink_cookie',
  28.   24 => 'trustlink_debug',
  29.   25 => 'trustlink_debug',
  30.   26 => 'REQUEST_URI',
  31.   27 => 'REQUEST_URI',
  32.   28 => 'trustlink_updatedb',
  33.   29 => 'trustlink_updatedb',
  34.   30 => 'verbose',
  35.   31 => 'verbose',
  36.   32 => 'charset',
  37.   33 => 'charset',
  38.   34 => 'charset',
  39.   35 => 'windows-1251',
  40.   36 => 'fetch_remote_type',
  41.   37 => 'fetch_remote_type',
  42.   38 => 'fetch_remote_type',
  43.   39 => 'socket_timeout',
  44.   40 => 'socket_timeout',
  45.   41 => 'socket_timeout',
  46.   42 => 'socket_timeout',
  47.   43 => 'force_show_code',
  48.   44 => 'force_show_code',
  49.   45 => '_TRUSTLINK_USER',
  50.   46 => 'Не задана константа _TRUSTLINK_USER',
  51.   47 => 'ignore_case',
  52.   48 => 'ignore_case',
  53.   49 => ' ',
  54.   50 => 'allow_url_fopen',
  55.   51 => 'default_socket_timeout',
  56.   52 => 'user_agent',
  57.   53 => 'file_get_contents',
  58.   54 => '',
  59.   55 => 'allow_url_fopen',
  60.   56 => 'file_get_contents',
  61.   57 => '
  62. ',
  63.   58 => 'http://',
  64.   59 => 'http://',
  65.   60 => 'curl',
  66.   61 => '',
  67.   62 => 'curl',
  68.   63 => 'http://',
  69.   64 => 'Accept-Charset: ',
  70.   65 => 'socket',
  71.   66 => '',
  72.   67 => '
  73.  
  74. ',
  75.   68 => '
  76.  
  77. ',
  78.   69 => 'Не могу подключиться к серверу: ',
  79.   70 => ', type: ',
  80.   71 => 'rb',
  81.   72 => '',
  82.   73 => 'Не могу считать данные из файла: ',
  83.   74 => 'ab',
  84.   75 => 'Нарушена целостность данных при записи в файл: ',
  85.   76 => 'Не могу записать данные в файл: ',
  86.   77 => '<p style="color: red; font-weight: bold;">TRUSTLINK ERROR: ',
  87.   78 => '</p>',
  88.   79 => 'Нет файла ',
  89.   80 => '. Создать не удалось. Выставите права 777 на папку.',
  90.   81 => 'Нет доступа на запись к файлу: ',
  91.   82 => '! Выставите права 777 на папку.',
  92.   83 => '&charset=',
  93.   84 => 'FATAL ERROR:',
  94.   85 => '__trustlink_charset__',
  95.   86 => '__last_update__',
  96.   87 => '__multi_site__',
  97.   88 => '__fetch_remote_type__',
  98.   89 => '__ignore_case__',
  99.   90 => '__php_version__',
  100.   91 => '__server_software__',
  101.   92 => 'SERVER_SOFTWARE',
  102.   93 => '=',
  103.   94 => '?',
  104.   95 => '&',
  105.   96 => '',
  106.   97 => '<sape_noindex>',
  107.   98 => '</sape_noindex>',
  108.   99 => 'is_block_links',
  109.   100 => 'is_block_links',
  110.   101 => 'nof_links_requested',
  111.   102 => 'nof_links_requested',
  112.   103 => 'nof_links_displayed',
  113.   104 => 'nof_links_displayed',
  114.   105 => 'nof_obligatory',
  115.   106 => 'nof_obligatory',
  116.   107 => 'nof_conditional',
  117.   108 => 'nof_conditional',
  118.   109 => '<sape_block nof_req="',
  119.   110 => 'nof_links_requested',
  120.   111 => '" nof_displ="',
  121.   112 => 'nof_links_displayed',
  122.   113 => '" nof_oblig="',
  123.   114 => 'nof_obligatory',
  124.   115 => '" nof_cond="',
  125.   116 => 'nof_conditional',
  126.   117 => '">',
  127.   118 => '</sape_block>',
  128.   119 => 'block_no_css',
  129.   120 => 'block_orientation',
  130.   121 => 'block_width',
  131.   122 => '',
  132.   123 => '',
  133.   124 => 'is_block_links',
  134.   125 => '',
  135.   126 => '',
  136.   127 => 'is_block_links',
  137.   128 => 'nof_links_requested',
  138.   129 => 'nof_links_displayed',
  139.   130 => 'nof_obligatory',
  140.   131 => 'nof_conditional',
  141.   132 => 'block_no_css',
  142.   133 => 'css',
  143.   134 => 'block_orientation',
  144.   135 => 'block',
  145.   136 => 'item',
  146.   137 => 'item_container',
  147.   138 => '{item}',
  148.   139 => '',
  149.   140 => '#<a href="(https?://([^"/]+)[^"]*)"[^>]*>[\\s]*([^<]+)</a>#i',
  150.   141 => '1251',
  151.   142 => '{header}',
  152.   143 => '{text}',
  153.   144 => '{url}',
  154.   145 => '{link}',
  155.   146 => '{item}',
  156.   147 => '{item}',
  157.   148 => '',
  158.   149 => '{items}',
  159.   150 => '{td_width}',
  160.   151 => '{td_width}',
  161.   152 => 'block_width',
  162.   153 => 'block_width',
  163.   154 => '{block_style_custom}',
  164.   155 => 'style="width: ',
  165.   156 => 'block_width',
  166.   157 => '!important;"',
  167.   158 => 'block_no_css',
  168.   159 => 'block_orientation',
  169.   160 => 'block_width',
  170.   161 => '{',
  171.   162 => '}',
  172.   163 => '#\\{[a-z\\d_\\-]+\\}#',
  173.   164 => ' ',
  174.   165 => 'is_block_links',
  175.   166 => 'nof_links_requested',
  176.   167 => 'nof_links_displayed',
  177.   168 => 'nof_obligatory',
  178.   169 => 'nof_conditional',
  179.   170 => 'as_block',
  180.   171 => 'as_block',
  181.   172 => '<sape_noindex>',
  182.   173 => '</sape_noindex>',
  183.   174 => '<sape_noindex></sape_noindex>',
  184.   175 => '/',
  185.   176 => '.home.jpg',
  186.   177 => '/home.jpg',
  187.   178 => '/code.php?user=',
  188.   179 => '&host=',
  189.   180 => '__trustlink_delimiter__',
  190.   181 => '__trustlink_delimiter__',
  191.   182 => '__trustlink_charset__',
  192.   183 => '__trustlink_charset__',
  193.   184 => '',
  194.   185 => '__trustlink_new_url__',
  195.   186 => '__trustlink_new_url__',
  196.   187 => '__trustlink_new_url__',
  197.   188 => '__trustlink_show_only_block__',
  198.   189 => '__trustlink_show_only_block__',
  199.   190 => '__sape_block_tpl__',
  200.   191 => '__sape_block_tpl__',
  201.   192 => '__sape_block_tpl__',
  202.   193 => '__sape_block_tpl__',
  203.   194 => '__sape_block_tpl_options__',
  204.   195 => '__sape_block_tpl_options__',
  205.   196 => '__sape_block_tpl_options__',
  206.   197 => '__sape_block_tpl_options__',
  207.   198 => '__sape_block_uri_idna__',
  208.   199 => '__sape_block_uri_idna__',
  209.   200 => '__sape_block_uri_idna__',
  210.   201 => '__sape_block_uri_idna__',
  211.   202 => 'beforeall',
  212.   203 => 'beforeblock',
  213.   204 => 'afterblock',
  214.   205 => 'itemobligatory',
  215.   206 => 'itemconditional',
  216.   207 => 'afterall',
  217.   208 => '__sape_block_ins_',
  218.   209 => '__',
  219.   210 => '_block_ins_',
  220.   211 => '',
  221.   212 => '<!-- argument for replace_in_text_segment:
  222. ',
  223.   213 => '
  224. -->',
  225.   214 => '<!-- sentences for replace: ',
  226.   215 => '&amp;',
  227.   216 => '&',
  228.   217 => '&quot;',
  229.   218 => '"',
  230.   219 => '&#039;',
  231.   220 => '\'',
  232.   221 => '&lt;',
  233.   222 => '<',
  234.   223 => '&gt;',
  235.   224 => '>',
  236.   225 => '/',
  237.   226 => '/(&[#a-zA-Z0-9]{2,6};)/isU',
  238.   227 => '((',
  239.   228 => ')|(',
  240.   229 => '))',
  241.   230 => ' ',
  242.   231 => '((\\s)|(&nbsp;))+',
  243.   232 => '
  244.  
  245. ',
  246.   233 => '-->',
  247.   234 => '',
  248.   235 => '',
  249.   236 => ' ',
  250.   237 => '<',
  251.   238 => '/(?si)^(\\/?[a-z0-9]+)/',
  252.   239 => '/',
  253.   240 => '<!-- close_tag: ',
  254.   241 => ' -->',
  255.   242 => '',
  256.   243 => '<!-- open_tag: ',
  257.   244 => ' -->',
  258.   245 => '<!-- ',
  259.   246 => ' - deleted from open_tags -->',
  260.   247 => '<!-- start replacement -->',
  261.   248 => '>',
  262.   249 => '/',
  263.   250 => '/',
  264.   251 => '/',
  265.   252 => '/',
  266.   253 => '$',
  267.   254 => '\\$',
  268.   255 => '<!-- ',
  269.   256 => ' --- ',
  270.   257 => ' replaced -->',
  271.   258 => '>',
  272.   259 => '<!-- ',
  273.   260 => ' - added to open_tags, stop replacement -->',
  274.   261 => '/',
  275.   262 => '/',
  276.   263 => '/',
  277.   264 => '/',
  278.   265 => '$',
  279.   266 => '\\$',
  280.   267 => '<!-- ',
  281.   268 => ' --- ',
  282.   269 => ' replaced -->',
  283.   270 => '',
  284.   271 => '<',
  285.   272 => '<',
  286.   273 => '<!-- No word`s for page -->',
  287.   274 => '<!-- END: work of replace_in_text_segment() -->',
  288.   275 => '<sape_index>',
  289.   276 => '</sape_index>',
  290.   277 => '__trustlink_new_url__',
  291.   278 => '__trustlink_new_url__',
  292.   279 => '__trustlink_new_url__',
  293.   280 => '<!-- Not replaced: ',
  294.   281 => '
  295. ',
  296.   282 => '
  297.  
  298. ',
  299.   283 => '-->',
  300.   284 => '/(?smi)(<\\/?sape_index>)/',
  301.   285 => '',
  302.   286 => '<!-- Split by Sape_index cnt_parts=',
  303.   287 => '-->',
  304.   288 => '/(?smi)(<\\/?body[^>]*>)/',
  305.   289 => '<!-- Split by BODY -->',
  306.   290 => '<!-- Can`t split by BODY -->',
  307.   291 => '/(?smi)(<\\/?sape_index>)/',
  308.   292 => '',
  309.   293 => '__trustlink_new_url__',
  310.   294 => '__trustlink_new_url__',
  311.   295 => '__trustlink_new_url__',
  312.   296 => '<!-- No word`s for page -->',
  313.   297 => '/',
  314.   298 => '.words.db',
  315.   299 => '/words.db',
  316.   300 => '/code_context.php?user=',
  317.   301 => '&host=',
  318.   302 => 'headers_enabled',
  319.   303 => 'headers_enabled',
  320.   304 => 'charset',
  321.   305 => 'charset',
  322.   306 => 'charset',
  323.   307 => '',
  324.   308 => 'index',
  325.   309 => 'announcements_delimiter',
  326.   310 => 'index',
  327.   311 => 'announcements_delimiter',
  328.   312 => 'index',
  329.   313 => 'charset',
  330.   314 => 'charset',
  331.   315 => 'charset',
  332.   316 => 'index',
  333.   317 => 'charset',
  334.   318 => 'host',
  335.   319 => 'host',
  336.   320 => 'HTTP_HOST',
  337.   321 => 'index',
  338.   322 => 'announcements',
  339.   323 => '/',
  340.   324 => '/',
  341.   325 => 'index',
  342.   326 => 'announcements',
  343.   327 => '',
  344.   328 => 'index',
  345.   329 => 'checkCode',
  346.   330 => 'index',
  347.   331 => 'checkCode',
  348.   332 => 'index',
  349.   333 => 'announcements',
  350.   334 => 'index',
  351.   335 => 'announcements',
  352.   336 => 'index',
  353.   337 => 'announcements',
  354.   338 => 'index',
  355.   339 => 'announcements',
  356.   340 => '<sape_noindex>',
  357.   341 => '</sape_noindex>',
  358.   342 => 'index',
  359.   343 => 'articles.db',
  360.   344 => 'index',
  361.   345 => 'index',
  362.   346 => 'articles',
  363.   347 => 'index',
  364.   348 => 'index',
  365.   349 => 'images',
  366.   350 => 'index',
  367.   351 => 'checkCode',
  368.   352 => 'article',
  369.   353 => 'index',
  370.   354 => 'articles',
  371.   355 => 'id',
  372.   356 => '.article.db',
  373.   357 => 'id',
  374.   358 => 'article',
  375.   359 => 'date_updated',
  376.   360 => 'article',
  377.   361 => 'date_updated',
  378.   362 => 'date_updated',
  379.   363 => 'index',
  380.   364 => 'templates',
  381.   365 => 'template_id',
  382.   366 => 'url',
  383.   367 => 'template_id',
  384.   368 => '/images/',
  385.   369 => 'Нет папки ',
  386.   370 => '. Создать не удалось. Выставите права 777 на папку.',
  387.   371 => '.',
  388.   372 => 'image',
  389.   373 => 'index',
  390.   374 => 'images',
  391.   375 => 'id',
  392.   376 => '.',
  393.   377 => 'ext',
  394.   378 => 'date_updated',
  395.   379 => 'date_updated',
  396.   380 => 'dispenser_path',
  397.   381 => 'FATAL ERROR:',
  398.   382 => 'mime',
  399.   383 => 'mime',
  400.   384 => 'image',
  401.   385 => 'Content-Type: ',
  402.   386 => '{meta_charset}',
  403.   387 => 'index',
  404.   388 => 'template_fields',
  405.   389 => 'article',
  406.   390 => '{',
  407.   391 => '}',
  408.   392 => 'article',
  409.   393 => '{',
  410.   394 => '}',
  411.   395 => '',
  412.   396 => 'tpl.articles.db',
  413.   397 => 'templates',
  414.   398 => 'templates',
  415.   399 => 'templates',
  416.   400 => 'date_updated',
  417.   401 => 'index',
  418.   402 => 'templates',
  419.   403 => 'lifetime',
  420.   404 => 'templates',
  421.   405 => 'Не найден шаблон для статьи',
  422.   406 => 'templates',
  423.   407 => 'body',
  424.   408 => '',
  425.   409 => 'path',
  426.   410 => 'path',
  427.   411 => 'query',
  428.   412 => '?',
  429.   413 => 'query',
  430.   414 => 'templates',
  431.   415 => 'body',
  432.   416 => 'date_updated',
  433.   417 => 'templates',
  434.   418 => 'mask',
  435.   419 => 'code',
  436.   420 => 'len',
  437.   421 => 'mask',
  438.   422 => 'code',
  439.   423 => 'len',
  440.   424 => '~(\\<a [^\\>]*?href[^\\>]*?\\=["\']{0,1}http[^\\>]*?\\>.*?\\</a[^\\>]*?\\>|\\<a [^\\>]*?href[^\\>]*?\\=["\']{0,1}http[^\\>]*?\\>|\\<area [^\\>]*?href[^\\>]*?\\=["\']{0,1}http[^\\>]*?\\>)~si',
  441.   425 => '~\\<a |\\<area ~si',
  442.   426 => '~[\\s]{1}rel\\=["\']{1}[^ "\'\\>]*?["\']{1}| rel\\=[^ "\'\\>]*?[\\s]{1}~si',
  443.   427 => '~[\\s]{1}href\\=["\']{0,1}(http[^ "\'\\>]*)?["\']{0,1} {0,1}~si',
  444.   428 => 'index',
  445.   429 => 'ext_links_allowed',
  446.   430 => 'www.',
  447.   431 => 'C',
  448.   432 => '|<!--(.*?)-->|smi',
  449.   433 => 'S',
  450.   434 => '|<script[^>]*>.*?</script>|si',
  451.   435 => 'N',
  452.   436 => '|<noindex[^>]*>.*?</noindex>|si',
  453.   437 => 'host',
  454.   438 => 'host',
  455.   439 => '<noindex>',
  456.   440 => '</noindex>',
  457.   441 => '',
  458.   442 => 'N',
  459.   443 => 'host',
  460.   444 => 'host',
  461.   445 => '',
  462.   446 => '$0rel="nofollow" ',
  463.   447 => '',
  464.   448 => 'S',
  465.   449 => 'C',
  466.   450 => 'index',
  467.   451 => 'template_required_fields',
  468.   452 => '{',
  469.   453 => '}',
  470.   454 => 'В шаблоне не хватает поля ',
  471.   455 => '.',
  472.   456 => 'HTTP/1.x 200 OK',
  473.   457 => 'Content-Type: text/html; charset=',
  474.   458 => 'HTTP/1.x 404 Not Found',
  475.   459 => 'index',
  476.   460 => '/?user=',
  477.   461 => '&host=',
  478.   462 => '&rtype=',
  479.   463 => 'article',
  480.   464 => '/?user=',
  481.   465 => '&host=',
  482.   466 => '&rtype=',
  483.   467 => '&artid=',
  484.   468 => 'image',
  485.   469 => '/',
  486.   470 => '.',
  487.   471 => '/',
  488. ),
  489. );
  490.  
  491. $file_parse = './logo-decoded.php';
  492. $file_content = file_get_contents($file_parse);
  493. $replace_from = array();
  494. $replace_to = array();
  495. foreach($decode_funcs as $global_key => $global_vals) {
  496.     foreach ($global_vals as $global_val_key => $global_val_func) {
  497.         $replace_from[] = $global_key.'('.$global_val_key.')';
  498.         $replace_to[] = '"'.$global_val_func.'"';
  499.     }
  500. }
  501.  
  502. $file_content = str_replace($replace_from, $replace_to, $file_content);
  503. print $file_content . PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement