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

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

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

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

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

標(biāo)簽:延邊 電商邀評 那曲 河池 優(yōu)質(zhì)小號 銅川 蘇州 新鄉(xiāng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ASP下的兩個防止SQL注入式攻擊的Function》,本文關(guān)鍵詞  ASP,下,的,兩個,防止,SQL,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《ASP下的兩個防止SQL注入式攻擊的Function》相關(guān)的同類信息!
  • 本頁收集關(guān)于ASP下的兩個防止SQL注入式攻擊的Function的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 阿瓦提县| 南康市| 海城市| 花莲市| 泗阳县| 喀什市| 淄博市| 运城市| 信阳市| 大竹县| 光山县| 榕江县| 北海市| 饶平县| 乌兰察布市| 瑞昌市| 淳化县| 屏东县| 屏东县| 青州市| 丰镇市| 虞城县| 新河县| 马公市| 伽师县| 锡林浩特市| 和龙市| 云龙县| 枞阳县| 江都市| 宁夏| 华坪县| 阿拉尔市| 闵行区| 大同县| 旺苍县| 五莲县| 资中县| 河源市| 龙山县| 开封县|