Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php\n\nif($_SERVER['REQUEST_METHOD'] === \"POST\"){\n\tif(isset($_POST['path'])){\n\t\th..
Decoded Output download
<?php
if($_SERVER['REQUEST_METHOD'] === \"POST\"){
if(isset($_POST['path'])){
header('Content-type: application\/json');
$_POST['path'] = str_replace( array(\"..\/\", \"..\\"\"), \"\", $_POST['path']);
echo json_encode(scandir(\"\/var\/www\/html\/\" . $_POST['path']));
}else{
header('Content-type: application\/json');
echo '[false]';
}
}
?>
Did this file decode correctly?
Original Code
<?php\n\nif($_SERVER['REQUEST_METHOD'] === \"POST\"){\n\tif(isset($_POST['path'])){\n\t\theader('Content-type: application\/json');\n\t\t$_POST['path'] = str_replace( array(\"..\/\", \"..\\\"\"), \"\", $_POST['path']);\n\t\techo json_encode(scandir(\"\/var\/www\/html\/\" . $_POST['path']));\n\t}else{\n\t\theader('Content-type: application\/json');\n\t\techo '[false]';\n\t}\n}\n
Function Calls
| None |
Stats
| MD5 | 4625e440bf90c47b16acbe4aafa7b02b |
| Eval Count | 0 |
| Decode Time | 78 ms |