毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第8页

更新时间:2010-4-4:  来源:毕业论文
企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第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,"&nbsp;"," "),"&quot;",Chr(34)),"&gt;",">"),"&lt;","<")
  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," ","&nbsp;"),Chr(34),"&quot;")
 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", "sel&#101;ct")
 ParaValue = Replace(ParaValue, "join", "jo&#105;n")
 ParaValue = Replace(ParaValue, "union", "un&#105;on")
 ParaValue = Replace(ParaValue, "where", "wh&#101;re")
 ParaValue = Replace(ParaValue, "insert", "ins&#101;rt")
 ParaValue = Replace(ParaValue, "delete", "del&#101;te")
 ParaValue = Replace(ParaValue, "update", "up&#100;ate")
 ParaValue = Replace(ParaValue, "like", "lik&#101;")
 ParaValue = Replace(ParaValue, "drop", "dro&#112;")
 ParaValue = Replace(ParaValue, "create", "cr&#101;ate")
 ParaValue = Replace(ParaValue, "modify", "mod&#105;fy")
 ParaValue = Replace(ParaValue, "rename", "ren&#097;me")
 ParaValue = Replace(ParaValue, "alter", "alt&#101;r")

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页

企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第8页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。