六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

ASP上2個防范SQL注入式攻擊Function

[摘要]'=========================='過濾提交表單中的SQL'==========================function ForSqlForm() dim fqys,errc,i,items dim nothis(18) nothis(0)=&...
'==========================
'過濾提交表單中的SQL
'==========================
function ForSqlForm()
 dim fqys,errc,i,items
 dim nothis(18)
 nothis(0)="net user"

 nothis(1)="xp_cmdshell"

 nothis(2)="/add"

 nothis(3)="exec%20master.dbo.xp_cmdshell"

 nothis(4)="net localgroup administrators"

 nothis(5)="select"

 nothis(6)="count"

 nothis(7)="asc"

 nothis(8)="char"

 nothis(9)="mid"

 nothis(10)="'"

 nothis(11)=":"

 nothis(12)=""""

 nothis(13)="insert"

 nothis(14)="delete"

 nothis(15)="drop"

 nothis(16)="truncate"

 nothis(17)="from"

 nothis(18)="%"
 
 'nothis(19)="@" 

 errc=false

 for i= 0 to ubound(nothis)
  for each items in request.Form
  if instr(request.Form(items),nothis(i))<>0 then
   response.write("<div>")
   response.write("你所填寫的信息:" & server.HTMLEncode(request.Form(items))
& "<br>含非法字符:" & nothis(i))
   response.write("</div>")
   response.write("對不起,你所填寫的信息含非法字符!
<a href=""#"" onclick=""history.back()"">返回</a>")
   response.End()
  end if
  next
 next
end function
'==========================
'過濾查詢中的SQL
'==========================
function ForSqlInjection()
 dim fqys,errc,i
 dim nothis(19)
 fqys = request.ServerVariables("QUERY_STRING")
 nothis(0)="net user"

 nothis(1)="xp_cmdshell"

 nothis(2)="/add"

 nothis(3)="exec%20master.dbo.xp_cmdshell"

 nothis(4)="net localgroup administrators"

 nothis(5)="select"

 nothis(6)="count"

 nothis(7)="asc"

 nothis(8)="char"

 nothis(9)="mid"

 nothis(10)="'"

 nothis(11)=":"

 nothis(12)=""""

 nothis(13)="insert"

 nothis(14)="delete"

 nothis(15)="drop"

 nothis(16)="truncate"

 nothis(17)="from"

 nothis(18)="%"
 
 nothis(19)="@" 

 errc=false

 for i= 0 to ubound(nothis)

 if instr(FQYs,nothis(i))<>0 then

 errc=true

 end if

 next

 if errc then
 response.write "查詢信息含非法字符!<a href=""#"" onclick=""history.back()"">返回</a>"
 response.end

 end if

end function





主站蜘蛛池模板: 天天躁夜夜躁很很躁麻豆 | 污污视频在线免费观看 | 深夜视频在线观看免费 | 日韩伦理一区二区三区 | 天天干天天骑 | 天天做天天欢天天爽 | 亚洲精品欧美精品国产精品 | 亚洲欧洲一区二区三区在线 | 日韩高清一级毛片 | 日本不卡视频在线视频观看 | 亚洲国产成人久久笫一页 | 日韩欧美在线综合网高清 | 夜夜爽天天狠狠九月婷婷 | 日本爽爽爽爽爽爽在线观看免 | 最新69国产成人精品视频69 | 五月婷婷丁香在线观看 | 一级黄色在线 | 色羞羞| 日韩在线网址 | 日本不卡高清免费v | 中文字幕亚洲自拍 | 日韩欧美一区二区三区不卡在线 | 午夜免费网站 | 日日插夜夜操 | 青青草 久久久 | 日韩aaa| 日本免费的一级v一片 | 欧美午夜不卡在线观看最新 | 任我爽在线视频精品凹凸精品分类 | 色好吊| 日韩亚洲一区中文字幕在线 | 天天玩夜夜操 | 偷窥综合网 | 日韩在线一区视频 | 日日夜夜爽| 日韩手机看片福利精品 | 一级毛片免费高清视频 | 日韩亚洲综合精品国产 | 日本亚洲欧美美色 | 人人做人人看 | 中文字幕亚洲国产 |