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

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

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





主站蜘蛛池模板: 欧美一区二区三区免费观看视频 | 日韩欧美二区在线观看 | 中文字幕免费在线观看 | 有毛片毛毛片毛片毛片 | 欧美在线日韩在线 | 四虎影库在线播放 | 亚洲欧美日韩三级 | 在线看片欧美 | 亚洲成人xxx | 青青草一区国产97 | 又粗又硬又爽的三级视频 | 四虎在线免费观看视频 | 三级黄色片免费观看 | 日韩欧美中文在线 | 亚洲精品91在线 | 午夜亚洲国产精品福利 | 色综合久久夜色精品国产 | 在线高清h视频在线观看 | 有毛片毛毛片毛片毛片 | 亚洲韩国日本欧美一区二区三区 | 天天躁日日躁 疯人影院 | 在线人成精品免费视频 | 天天做天天爱夜夜爽毛片毛片 | 四虎影视库国产精品一区 | 最新版天堂资源中文官网 | 亚洲看逼 | 在线观看视频一区二区 | 日本中文在线观看 | 日本a视频在线观看 | 一级做a爰片性色毛片小说 一级做a爰片性色毛片思念网 | 午夜视频免费在线播放 | 欧美亚洲国产精品 | 亚洲国产成人精彩精品 | 青青热久免费精品视频网站 | 婷婷综合久久中文字幕一本 | 日本亚洲高清 | 任我爽精品视频在线播放 | 日韩大片免费观看 | 日本一区二区三 | 午夜亚洲福利 | 四虎影院com |