婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > ASP下的兩個防止SQL注入式攻擊的Function

ASP下的兩個防止SQL注入式攻擊的Function

熱門標簽:調度系統外呼 伊春外呼業務系統 福建外呼增值業務線路 宜賓語音外呼系統軟件 中國辦理電信400電話 電銷機器人教育 綿陽防封電銷卡價格 電銷機器人源碼網盤下載 河北智能外呼系統軟件
用于防止sql注入攻擊的 函數,大家可以直接用了,不過大家光會用不行,要增強安全意識
復制代碼 代碼如下:

'==========================
'過濾提交表單中的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

標簽:延邊 電商邀評 那曲 河池 優質小號 銅川 蘇州 新鄉

巨人網絡通訊聲明:本文標題《ASP下的兩個防止SQL注入式攻擊的Function》,本文關鍵詞  ASP,下,的,兩個,防止,SQL,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《ASP下的兩個防止SQL注入式攻擊的Function》相關的同類信息!
  • 本頁收集關于ASP下的兩個防止SQL注入式攻擊的Function的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 黄浦区| 德令哈市| 武安市| 庆城县| 武隆县| 海兴县| 克东县| 福州市| 大方县| 慈溪市| 宁晋县| 嘉鱼县| 郯城县| 芜湖市| 盐津县| 洪雅县| 郸城县| 汕头市| 孟州市| 临海市| 砀山县| 嘉祥县| 湖南省| 邳州市| 龙江县| 比如县| 曲靖市| 搜索| 巨野县| 威海市| 北京市| 大石桥市| 会理县| 巴彦县| 酒泉市| 饶河县| 怀仁县| 文登市| 大洼县| 无棣县| 西乌珠穆沁旗|