趁着快下班看了某CMS的代码,在这顺便鄙视下某些CMS厂家用ZEND
加密代码然后以为这样就瞒了全天下用户然后再对外宣称:我们的程序N年没有
漏洞啦,放心来买吧!shit!
程序有个小功能:
if(isset($_GET['apath']))$apath=$_GET['apath'];
if(empty($apath)) $apath='/'.$uploaddir.'/image/';
if(isset($_GET['path']))$apath=$_GET['path'];
.......
$truePath = '.'.$apath;
......
while($filename=$dh->read()){
if(!ereg("\.$",$filename)){
$fullName = $truePath."/".$filename;
$fileUrl = $nowPath."/".$filename;
if(is_dir($fullName)){
if($col%$listSize==0&&$col!=0){
echo("</tr>\n<tr align='center'>\n");
for($i=$rowdd-$listSize;$i<$rowdd;$i++){
if(isset($filelist[$i]))echo("<td>".$filelist[$i]."</td>\n");
}
echo("</tr>\n<tr align='center'>\n");
}
$line = " "
//爽了,遍历目录...GO ON
......
elseif(IsImg($filename)){
if($col%$listSize==0&&$col!=0){
echo("</tr>\n<tr align='center'>\n");
for($i=$rowdd-$listSize;$i<$rowdd;$i++){
if(isset($filelist[$i]))echo("<td>".$filelist[$i]."</td>\n");
}
echo("</tr>\n<tr align='center'>\n");
}
$line = "
//干吗呢??GO ON
.......................
function IsImg($fileName)
{
if(ereg("\.(jpg|gif|png)$",$fileName)) return 1;
else return 0;
} //我日...只能浏览目录和图片-_-凸
xxx.php?apath=../../../
只能看看服务器上都有些什么程序目录,然后还能方便的欣赏下服务器上的图片.....当然,你得跳的出去...