来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 上次发的那个官方已补,再来继续看看还可以不。IIS6 or LINUX+APACHE详细说明:上回分解 请看这 WooYun: qibocms 新闻系统 Getshell (需结合解析漏洞) http: bbs qibosoft com down2 php?v=news1 0 d...
|
上次发的那个官方已补,再来继续看看还可以不。 上回分解 请看这 WooYun: qibocms 新闻系统 Getshell (需结合解析漏洞)
function get_outpic($str,$fid=0,$getpic=1){
global $webdb,$lfjuid,$_pre;
if(!$getpic){
return $str;
}
preg_match_all("/http:\/\/([^ '\"<>]+)\.(gif|jpg|jpeg|png)/is",$str,$array);
$filedb=$array[0];
foreach( $filedb AS $key=>$value){
if( strstr($value,$webdb[www_url]) ){
continue;
}
$listdb["$value"]=$value;
}
unset($filedb);
foreach( $listdb AS $key=>$value){
$filedb[]=$value;
$name=$lfjuid.'_'.rands(5)."__".preg_replace("/(.*)\.(jpg|png|gif)$/is",".\\2",$value);
function get_out_pic($str,$getpic=1){
global $webdb,$_pre;
if(!$getpic){
return $str;
}
preg_match_all("/http:\/\/([^ '\"<>]+)\.(gif|jpg|png)/is",$str,$array);
$filedb=$array[0];
foreach( $filedb AS $key=>$value){
if( strstr($value,$webdb[www_url]) ){
continue;
}
$listdb["$value"]=$value;
}
unset($filedb);
foreach( $listdb AS $key=>$value){
$filedb[]=$value;
$name=rands(5)."__".basename($value);
if(!is_dir(ROOT_PATH."$webdb[updir]/form")){
makepath(ROOT_PATH."$webdb[updir]/form");
}
$ck=0;
if( @copy($value,ROOT_PATH."$webdb[updir]/form/$name") ){
$ck=1;
}elseif($filestr=file_get_contents($value)){
$ck=1;
write_file(ROOT_PATH."$webdb[updir]/form/$name",$filestr);
}
foreach( $m_config[is_html] AS $key=>$value) { $postdb[$key]=str_replace("<img ","<img onload=\'if(this.width>600)makesmallpic(this,600,800);\' ",$postdb[$key]); //图片目录转移 $postdb[$key]=move_attachment($lfjdb[uid],$postdb[$key],"form"); //获取远程图片 $postdb[$key]=get_out_pic($postdb[$key],$GetOutPic); $postdb[$key] = En_TruePath($postdb[$key]); $postdb[$key] = preg_replace('/javascript/i','java script',$postdb[$key]);//过滤js代码 $postdb[$key] = preg_replace('/<iframe ([^<>]+)>/i','<iframe \\1>',$postdb[$key]);//过滤框架代码 }
修复方案:参照你们之前的那样。 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com