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

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

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





主站蜘蛛池模板: 亚洲视频网址 | 先锋影音亚洲 | 中文字幕第38页永久乱码 | 亚洲精品中文字幕乱码三区一二 | 日本黄色app| 伊人久久婷婷丁香六月综合基地 | 最近更新免费中文字幕大全 | 色老大综合久久综合热 | 日韩欧国产精品一区综合无码 | 一二三四日本高清观看视频 | 午夜色影院| 五级床片全部免费播放 | 欧美视频日韩专区午夜 | 天天五月天丁香婷婷深爱综合 | 无人精品乱码一区二区三区 | 欧美一级手机免费观看片 | 欧美限制级在线观看 | 亚洲欧美日本视频 | 欧洲乱码专区一区二区三区四区 | 日韩无套| 日本中文字幕不卡 | 欧美最猛性 | 五月婷婷六月香 | 午夜三级国产精品理论三级 | 五月激情综合丁香色婷婷 | 视频二区 素人 欧美 日韩 | 日本欧美一区二区三区在线观看 | 奇米狠狠色| 综合色天天 | 日韩精品在线免费观看 | 日韩成人精品在线 | 日韩一区二区三区免费 | 欧美亚洲国产日韩 | 人人揉揉揉人人捏人人看 | 日韩一级片免费在线观看 | 一级毛片免费毛片一级毛片免费 | 色婷五月 | 天天做爽夜夜做爽 | 亚洲欧美v国产一区二区 | 日韩午夜在线视频不卡片 | 日韩欧美h |