<?php
$decode_funcs = array(
// сюда можно добавлять еще массивы для декодирования расшифрованные из других файлов
'_888028985_' => array(
0 => 'str_replace',
1 => 'unlink',
2 => 'preg_match',
3 => 'mysql_connect',
4 => 'mysql_error',
5 => 'mysql_select_db',
6 => 'mysql_error',
7 => 'mysql_query',
8 => 'mysql_query',
9 => 'mysql_escape_string',
10 => 'mysql_error',
11 => 'mysql_fetch_assoc',
12 => 'mysql_query',
13 => 'mysql_escape_string',
14 => 'mysql_error',
15 => 'mysql_insert_id',
16 => 'flush',
17 => 'ob_flush',
18 => 'flush',
19 => 'flush',
20 => 'ob_flush',
21 => 'flush',
22 => 'mysql_close',
23 => 'preg_match',
24 => 'rand',
25 => 'str_replace',
26 => 'preg_match_all',
27 => 'file_exists',
28 => 'trim',
29 => 'strip_tags',
30 => 'mysql_connect',
31 => 'mysql_error',
32 => 'mysql_select_db',
33 => 'mysql_error',
34 => 'mysql_query',
35 => 'mysql_query',
36 => 'mysql_escape_string',
37 => 'mysql_error',
38 => 'mysql_close',
39 => 'mysql_fetch_assoc',
40 => 'substr_count',
41 => 'flush',
42 => 'ob_flush',
43 => 'flush',
44 => 'trim',
45 => 'preg_match',
46 => 'trim',
47 => 'preg_match',
48 => 'preg_match',
49 => 'preg_match_all',
50 => 'preg_match_all',
51 => 'preg_match',
52 => 'trim',
53 => 'preg_replace',
54 => 'preg_replace',
55 => 'preg_match',
56 => 'time',
57 => 'file_put_contents',
58 => 'mysql_connect',
59 => 'mysql_error',
60 => 'mysql_select_db',
61 => 'mysql_error',
62 => 'mysql_query',
63 => 'mysql_escape_string',
64 => 'str_replace',
65 => 'rand',
66 => 'mysql_query',
67 => 'mysql_error',
68 => 'mysql_insert_id',
69 => 'mysql_query',
70 => 'mysql_fetch_array',
71 => 'mysql_query',
72 => 'mysql_insert_id',
73 => 'mysql_query',
74 => 'mysql_fetch_array',
75 => 'mysql_query',
76 => 'mysql_insert_id',
77 => 'mysql_query',
78 => 'mysql_query',
79 => 'mysql_close',
80 => 'flush',
81 => 'ob_flush',
82 => 'flush',
83 => 'flush',
84 => 'ob_flush',
85 => 'flush',
),
);
$file_parse = $_SERVER['argv'][1];
$file_content = file_get_contents($file_parse);
$replace_from = array();
$replace_to = array();
foreach($decode_funcs as $global_key => $global_vals) {
foreach ($global_vals as $global_val_key => $global_val_func) {
$replace_from[] = '$GLOBALS[\''.$global_key.'\']['.$global_val_key.']';
$replace_to[] = $global_val_func;
}
}
$file_content = str_replace($replace_from, $replace_to, $file_content);
print $file_content . PHP_EOL;