企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第8页
NewCode = 1
Dim Been
For cecb = 1 To CodeLen
Been = CodeLen + Asc(Mid(CodeStr,cecb,1)) * cecb
NewCode = NewCode * Been
Next
CodeStr = NewCode
NewCode = Empty
For cec = 1 To Len(CodeStr)
NewCode = NewCode & CfsCode(Mid(CodeStr,cec,3))
Next
For cec = 20 To Len(NewCode) - 18 Step 2
EnPas = EnPas & Mid(NewCode,cec,1)
Next
EnPas = "ES-" & EnPas
End Function
Function CfsCode(Word)
Dim cc
For cc = 1 To Len(Word)
CfsCode = CfsCode & Asc(Mid(Word,cc,1))
Next
CfsCode = Hex(CfsCode)
End Function
'过滤跨站脚本和HTML标签,codez by foosun
Function NoHtmlHackInput(Str)
Dim regEx
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Pattern = "<|>|(script)|on(mouseover|mouseon|mouseout|click|dblclick|blur|focus|change)|eval|\t"
If regEx.Test(LCase(Str)) Then
Response.Write "<html><title>警告</title><body bgcolor=""EEEEEE"" leftmargin=""60"" topmargin=""30""><font style=""font-size:16px;font-weight:bolder;color:blue;""><li>您提交的数据有恶意字符</li></font><font style=""font-size:14px;font-weight:bolder;color:red;""><br><li>提交的内容不能包括[<|>|(script)|on(mouseover|mouseon|mouseout|click|dblclick|blur|focus|change)|eval]</li><li>您的数据已经被记录!</li><br><li>您的IP:"&Request.ServerVariables("Remote_Addr")&"</li><br><li>操作日期:"&Now&"</li></font></body></html>"
Response.End
End If
Set regEx = Nothing
NoHtmlHackInput = Str
End Function
'获得中文字数,1个中文站2个字符,codez by Simpwind,foosun
Function GotTopic(Str,StrLen)
Dim l,t,c, i,LableStr,regEx,Match,Matches
If StrLen=0 then
GotTopic=""
exit function
End If
if IsNull(Str) then
GotTopic = ""
Exit Function
end if
if Str = "" then
GotTopic=""
Exit Function
end If
Str=Replace(Replace(Replace(Replace(Str," "," "),""",Chr(34)),">",">"),"<","<")
l=len(str)
t=0
strlen=Clng(strLen)
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
GotTopic=left(str,i)
exit for
else
GotTopic=str
end if
Next
GotTopic = Replace(Replace(GotTopic," "," "),Chr(34),""")
End Function
'过滤安全字符
Function SafeRequest(ParaName,ParaType)
'--- 传入参数 ---
'ParaName:参数名称-字符型
'ParaType:参数类型-数字型(1表示以上参数是数字,0表示以上参数为字符)
Dim ParaValue
ParaValue=Request(ParaName)
If ParaType=1 then
If not isNumeric(ParaValue) then
Response.write "参数" & ParaName & "必须为数字型!<br /><br />"
Response.end
End if
Else
ParaValue=replace(ParaValue,"'","''")
ParaValue = Replace(ParaValue, "select", "select")
ParaValue = Replace(ParaValue, "join", "join")
ParaValue = Replace(ParaValue, "union", "union")
ParaValue = Replace(ParaValue, "where", "where")
ParaValue = Replace(ParaValue, "insert", "insert")
ParaValue = Replace(ParaValue, "delete", "delete")
ParaValue = Replace(ParaValue, "update", "update")
ParaValue = Replace(ParaValue, "like", "like")
ParaValue = Replace(ParaValue, "drop", "drop")
ParaValue = Replace(ParaValue, "create", "create")
ParaValue = Replace(ParaValue, "modify", "modify")
ParaValue = Replace(ParaValue, "rename", "rename")
ParaValue = Replace(ParaValue, "alter", "alter")
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页
企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第8页下载如图片无法显示或论文不完整,请联系qq752018766