Advertisement
anton_slim

__decode.php

Feb 1st, 2012
3,229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.76 KB | None | 0 0
  1. <?php
  2. $decode_funcs = array(
  3.     // сюда можно добавлять еще массивы для декодирования расшифрованные из других файлов
  4.     '_888028985_' => array(
  5.         0 => 'str_replace',
  6.         1 => 'unlink',
  7.         2 => 'preg_match',
  8.         3 => 'mysql_connect',
  9.         4 => 'mysql_error',
  10.         5 => 'mysql_select_db',
  11.         6 => 'mysql_error',
  12.         7 => 'mysql_query',
  13.         8 => 'mysql_query',
  14.         9 => 'mysql_escape_string',
  15.         10 => 'mysql_error',
  16.         11 => 'mysql_fetch_assoc',
  17.         12 => 'mysql_query',
  18.         13 => 'mysql_escape_string',
  19.         14 => 'mysql_error',
  20.         15 => 'mysql_insert_id',
  21.         16 => 'flush',
  22.         17 => 'ob_flush',
  23.         18 => 'flush',
  24.         19 => 'flush',
  25.         20 => 'ob_flush',
  26.         21 => 'flush',
  27.         22 => 'mysql_close',
  28.         23 => 'preg_match',
  29.         24 => 'rand',
  30.         25 => 'str_replace',
  31.         26 => 'preg_match_all',
  32.         27 => 'file_exists',
  33.         28 => 'trim',
  34.         29 => 'strip_tags',
  35.         30 => 'mysql_connect',
  36.         31 => 'mysql_error',
  37.         32 => 'mysql_select_db',
  38.         33 => 'mysql_error',
  39.         34 => 'mysql_query',
  40.         35 => 'mysql_query',
  41.         36 => 'mysql_escape_string',
  42.         37 => 'mysql_error',
  43.         38 => 'mysql_close',
  44.         39 => 'mysql_fetch_assoc',
  45.         40 => 'substr_count',
  46.         41 => 'flush',
  47.         42 => 'ob_flush',
  48.         43 => 'flush',
  49.         44 => 'trim',
  50.         45 => 'preg_match',
  51.         46 => 'trim',
  52.         47 => 'preg_match',
  53.         48 => 'preg_match',
  54.         49 => 'preg_match_all',
  55.         50 => 'preg_match_all',
  56.         51 => 'preg_match',
  57.         52 => 'trim',
  58.         53 => 'preg_replace',
  59.         54 => 'preg_replace',
  60.         55 => 'preg_match',
  61.         56 => 'time',
  62.         57 => 'file_put_contents',
  63.         58 => 'mysql_connect',
  64.         59 => 'mysql_error',
  65.         60 => 'mysql_select_db',
  66.         61 => 'mysql_error',
  67.         62 => 'mysql_query',
  68.         63 => 'mysql_escape_string',
  69.         64 => 'str_replace',
  70.         65 => 'rand',
  71.         66 => 'mysql_query',
  72.         67 => 'mysql_error',
  73.         68 => 'mysql_insert_id',
  74.         69 => 'mysql_query',
  75.         70 => 'mysql_fetch_array',
  76.         71 => 'mysql_query',
  77.         72 => 'mysql_insert_id',
  78.         73 => 'mysql_query',
  79.         74 => 'mysql_fetch_array',
  80.         75 => 'mysql_query',
  81.         76 => 'mysql_insert_id',
  82.         77 => 'mysql_query',
  83.         78 => 'mysql_query',
  84.         79 => 'mysql_close',
  85.         80 => 'flush',
  86.         81 => 'ob_flush',
  87.         82 => 'flush',
  88.         83 => 'flush',
  89.         84 => 'ob_flush',
  90.         85 => 'flush',
  91.     ),
  92. );
  93.  
  94. $file_parse = $_SERVER['argv'][1];
  95.  
  96. $file_content = file_get_contents($file_parse);
  97. $replace_from = array();
  98. $replace_to = array();
  99. foreach($decode_funcs as $global_key => $global_vals) {
  100.     foreach ($global_vals as $global_val_key => $global_val_func) {
  101.         $replace_from[] = '$GLOBALS[\''.$global_key.'\']['.$global_val_key.']';
  102.         $replace_to[] = $global_val_func;
  103.     }
  104. }
  105.  
  106. $file_content = str_replace($replace_from, $replace_to, $file_content);
  107. print $file_content . PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement