来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 最大化。 还有个跟之前类似的洞 这里就不多说了。http: bbs qibosoft com down2 php?v=photo1 0 down下载地址还有类似的 就说这里了。在photo member post php中require_once(Mpath inc check postarticle...
|
最大化。 还有个跟之前类似的洞 这里就不多说了。 http://bbs.qibosoft.com/down2.php?v=photo1.0#down
require_once(Mpath."inc/check.postarticle.php");
if($job=='postnew')
{
if($step=='post')
{
post_new();
//生成静态
make_article_html("$Murl/member/post.php?job=endHTML&aid=$aid");
$mid && $mid<106 && $none='none';
refreshto("?job=postnew&fid=$fid","<CENTER>[<A HREF='?job=postnew&fid=$fid'>继续发表新主题</A>] <span style='display:$none;'>[<A HREF='?job=post_more&fid=$fid&aid=$aid'>续发本主题</A>]</span> [<A HREF='myarticle.php?job=myarticle&fid=$fid'>返回主题列表</A>] [<A HREF='$Mdomain/bencandy.php?fid=$fid&aid=$aid' target=_blank>查看主题</A>] [<A HREF='?job=edit&aid=$aid'>点击修改</A>]</CENTER>",60);
}
$postdb[smalltitle]=filtrate($postdb[smalltitle]);
$postdb[picurl]=filtrate($postdb[picurl]);
//$postdb[description]=filtrate($postdb[description]);
$postdb[author]=filtrate($postdb[author]);
$postdb[copyfrom]=filtrate($postdb[copyfrom]);
$postdb[copyfromurl]=filtrate($postdb[copyfromurl]);
$postdb[description]=preg_replace('/javascript/i','java script',$postdb[description]);
$postdb[description]=preg_replace('/<iframe ([^<>]+)>/i','<iframe \\1>',$postdb[description]);
//针对火狐浏览器做的处理
$postdb[content]=str_replace("=\\\"../$webdb[updir]/","=\\\"$webdb[www_url]/$webdb[updir]/",$postdb[content]);
if(!$groupdb[PostNoDelCode]){
$postdb[content]=preg_replace('/javascript/i','java script',$postdb[content]);
$postdb[content]=preg_replace('/<iframe ([^<>]+)>/i','<iframe \\1>',$postdb[content]);
}
//采集外部图片
$postdb[content]=get_outpic($postdb[content],$fid,$GetOutPic);
if($post_db){
foreach($post_db[photourl][url] AS $key=>$value){
$value=trim($value);
if(!$value||eregi("://",$value)){
continue;
}
if(!$postdb[picurl]){
copy(ROOT_PATH."$webdb[updir]/$value",ROOT_PATH."$webdb[updir]/{$value}.jpg");
$postdb[picurl]="{$value}.jpg";
}
move_attachment($lfjuid,tempdir($value),$downloadDIR);
foreach($post_db[photourl][url] AS $key=>$value){
$value=trim($value);
if(!$value||eregi("://",$value)){
continue;
}
copy(ROOT_PATH."$webdb[updir]/$value",ROOT_PATH."$webdb[updir]/{$value}.jpg");
$postdb[picurl]="{$value}.jpg";
function mymd5($string,$action="EN",$rand=''){ //字符串加密和解密
global $webdb;
$secret_string = $webdb[mymd5].$rand.'5*j,.^&;?.%#@!'; //绝密字符串,可以任意设定
if(!is_string($string)){
$string=strval($string);
}
if($string==="") return "";
if($action=="EN") $md5code=substr(md5($string),8,10);
else{
$md5code=substr($string,-10);
$string=substr($string,0,strlen($string)-10);
}
//$key = md5($md5code.$_SERVER["HTTP_USER_AGENT"].$secret_string);
$key = md5($md5code.$secret_string);
$string = ($action=="EN"?$string:base64_decode($string));
$len = strlen($key);
$code = "";
for($i=0; $i<strlen($string); $i++){
$k = $i%$len;
$code .= $string[$i]^$key[$k];
}
$code = ($action == "DE" ? (substr(md5($code),8,10)==$md5code?$code:NULL) : base64_encode($code)."$md5code");
return $code;
}
首先利用任意文件读取。读取data/config.php
if($_COOKIE["adminID"]&&$detail=mymd5($_COOKIE["adminID"],'DE',$onlineip)){
unset($_uid,$_username,$_password);
list($_uid,$_username,$_password)=explode("\t",$detail);
$lfjdb=$db->get_one("SELECT * FROM {$pre}memberdata WHERE uid='$_uid' AND username='$_username'");
}
if($lfjdb[yz]){
$lfjid=$lfjdb['username'];
$lfjuid=$lfjdb['uid'];
$lfjdb[icon] && $lfjdb[icon]=tempdir($lfjdb[icon]);
if($lfjdb['groupid']==3||$lfjdb['groupid']==4){
$web_admin=$sort_admin='1';
}
if( file_exists(ROOT_PATH."data/group/{$lfjdb[groupid]}.php") ){
$groupdb=@include( ROOT_PATH."data/group/{$lfjdb[groupid]}.php");
function mymd5($string,$action="EN",$rand=''){ //字符串加密和解密
global $webdb;
$secret_string = $webdb[mymd5].$rand.'5*j,.^&;?.%#@!';
修复方案:源头还是任意文件查看。, |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com