账号通
    

账号  

密码  

1955

查看

5

回复
主题:[分享]X1可上传木马文件漏洞-解决方案 [收藏主题] 转到:  
jnletao 当前离线

49

主题

2

广播

0

粉丝
添加关注
级别:学前班

用户积分:467 分
登录次数:135 次
注册时间:2009/9/24
最后登录:2014/10/9
jnletao 发表于:2014/9/14 11:55:04   | 显示全部帖子 查看该作者主题 楼主 
做在线知识付费 选科汛云开店

9.5   X1  通用


KS_CLS/UploadFunction.asp


  1. '检查文件内容的是否合法Function CheckFileContent(byval path,byval filesize)dim kk,NoAllowExtArrpath=Replace(path,KS.Setting(2),"")NoAllowExtArr=split(NoAllowExt,"|")for kk=0 to ubound(NoAllowExtArr)if instr(replace(lcase(path),lcase(KS.Setting(2)),""),"." & NoAllowExtArr(kk))<>0 thencall KS.DeleteFile(path)CheckFileContent= "文件上传失败,文件名不合法"Exit Functionend ifNext'if filesize>50 then exit function '超过1000K跳过检测

    'if filesize>2000 then exit function '超过2000K跳过检测on error resume nextDim findcontent,regEx,foundtf


官方这里默认是大于50k的文件就不检测了,改为2000K,或更大

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.08594秒 powered by KesionCMS 9.0