# Time:2011-10-30

# Team:makebugs

# Author: 缘分 ############################################################################

http://t.qq.com/MakeBug

http://hi.baidu.com/micropoor

// includeslib_base.php function realip() { if(isset($_SERVER['HTTP_CLIENT_IP'])) { $realip = $_SERVER['HTTP_CLIENT_IP']; }elseif (isset($_SERVER['REMOTE_ADDR']))
{ $realip = $_SERVER['REMOTE_ADDR']; }
preg_match(“/[d.]{7,15}/”, $realip, $onlineip); $realip = !empty($onlineip[0]) ? $onlineip[0] : ’0.0.0.0′; return $realip; }

 

可以说是国际问题吗?

 

// adminupfile.php <?php session_start();
if($_SESSION['ss_adminid']==”) { exit(); }
$formname=$_POST['formname']; $editname=$_POST['editname'];
$allowtype=array(“gif”,”jpg”,”bmp”,”png”,”jpeg”); $ym=date(“Ym”);
$uploaddir=”../upfile/images/”.$ym.”/”; if(!is_dir($uploaddir)) {
mkdir($uploaddir); }
$f=date(“YmdHis”).basename($_FILES['upfile']['name']);
$uploadfile=$uploaddir.$f; $ufile=”upfile/images/”.$ym.”/{$f}”;
$bname=basename($_FILES['upfile']['name']); $ar=explode(“.”,$bname);
$f_type=strtolower($ar[count($ar)-1]);//获取文件后缀名 //略 ?>

怎么可以这么验证?

 

 

//鸡肋: // adminskins.php function deldir($dir) { if(!is_dir($dir)) return false; $dh=opendir($dir); while(($file=readdir($dh))!==false) { if($file!=”.” && $file!=”..”) { if(is_dir($dir.”/”.$file)) { deldir($dir.”/”.$file); }else {
unlink($dir.”/”.$file); } }
} closedir($dh); rmdir($dir); } /**
@删除目录下的所有文件 保留当前目录 */ function delfile($dir) { $hd=opendir($dir); while(($f=readdir($hd))!=false) {
if($f!=”..” and $f!=”.”) { if(is_file($dir.$f)){ unlink($dir.$f); }else { delfile($dir.$f.”/”);
} } }

 

 

其他利用:

 fckeditoreditorfilemanagerconnectorsuploadtest.html
fckeditoreditorfilemanagerconnectorstest.html