婷婷综合国产,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的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 个旧市| 兴国县| 藁城市| 彰武县| 文昌市| 库尔勒市| 友谊县| 诸城市| 芦溪县| 吉林市| 枝江市| 文安县| 新龙县| 正镶白旗| 尚义县| 聊城市| 武威市| 永兴县| 山丹县| 康马县| 邯郸县| 托克逊县| 涟源市| 建平县| 施甸县| 门头沟区| 边坝县| 仁寿县| 潮州市| 虞城县| 长海县| 邻水| 永仁县| 宁德市| 五指山市| 丹寨县| 宝鸡市| 确山县| 锦州市| 唐海县| 综艺|