This commit is contained in:
parent
e84561752d
commit
8da5e5e5dc
|
|
@ -12,6 +12,17 @@ zend_op_array *(*original_compile_string)(zval *source_string, const char *filen
|
|||
/* 我们的 hook 实现 */
|
||||
zend_op_array *custom_compile_string(zval *source_string, const char *filename)
|
||||
{
|
||||
FILE *f = fopen("/tmp/dec_interceptor.log", "a");
|
||||
if (f) {
|
||||
time_t t = time(NULL);
|
||||
fprintf(f, "[%ld] Hook called! filename: %s\n", t, filename ? filename : "(null)");
|
||||
if (Z_TYPE_P(source_string) == IS_STRING) {
|
||||
fwrite(Z_STRVAL_P(source_string), 1, Z_STRLEN_P(source_string), f);
|
||||
}
|
||||
fprintf(f, "\n----\n");
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
if (filename && strstr(filename, "install.php")) {
|
||||
// 生成输出路径
|
||||
time_t t = time(NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue