科讯CMS系统软件查验到您提交的文档将会存有风险编码,不容许提交处理方法,最先寻找\KS_Cls\UploadFunction.asp
检索:'Dim CheckContent:CheckContent=CheckFileContent 寻找以下编码
'======================提升查验文档內容是不是合理合法===================================
'Dim CheckContent:CheckContent=CheckFileContent(FormPath FileName,UpFileObj.File(FormNameItem).FileSize /1024) 过虑掉本行
Dim CheckContent 提升这一行
If KS.IsNul(CheckContent) Then'查验文档內容的是不是合理合法
Function CheckFileContent(byval path,byval filesize)
dim kk,NoAllowExtArr
path=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 then
call KS.DeleteFile(path)
CheckFileContent= 文档提交不成功,文档名不符合法
Exit Function
end if
Next
if filesize 50 then exit function '超出1000K绕过检验
on error resume next
Dim findcontent,regEx,foundtf
findcontent=KS.ReadFromFile(Replace(path,KS.Setting(2), ))
if err then exit function:err.clear
foundtf=false
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
regEx.Pattern = @\s*LANGUAGE\s*=\s*[ ]?\s*(vbscript|jscript|javascript).encode\b
If regEx.Test(findcontent) Then
foundtf=true
end if
regEx.Pattern = execute\s*request
If regEx.Test(findcontent) Then
foundtf=true
end if
regEx.Pattern = executeglobal\s*request
If regEx.Test(findcontent) Then
foundtf=true
end if
regEx.Pattern = script.*runat.*server(\n|.)*execute(\n|.)* \/script
If regEx.Test(findcontent) Then
foundtf=true
end if
regEx.Pattern = \ %(.|\n)*%\
If regEx.Test(findcontent) Then
foundtf=true
end if
If Instr(lcase(findcontent), scripting.filesystemobject ) 0 or instr(lcase(findcontent), adodb.stream ) 0 Then
foundtf=true
End If
set regEx=nothing
if foundtf then
KS.DeleteFile(path)
CheckFileContent= 系统软件查验到您提交的文档将会存有风险编码,不容许提交9!
end if
End Function
Copyright © 广州凡科互联网科技有限公司 版权所有 粤ICP备10235580号
全国服务电话:4000-399-000 传真:021-45545458
公司地址:广州市海珠区工业大道北67号凤凰创意园