相關(guān)資訊
- 《戰(zhàn)國(guó)無雙4-2》怎么換服裝?戰(zhàn)國(guó)無
- 關(guān)于責(zé)任的名言警句大全
- 《戰(zhàn)國(guó)無雙4-2》PC版如何聯(lián)機(jī)? 戰(zhàn)
- 戰(zhàn)國(guó)無雙4-2技能覺醒牛逼嗎 全新
- 《戰(zhàn)國(guó)無雙4-2》手柄無效怎么解決
- 戰(zhàn)國(guó)無雙4-2如何設(shè)置語言 戰(zhàn)國(guó)無雙
- 戰(zhàn)國(guó)無雙4-2怎么樣跳過進(jìn)入開場(chǎng)動(dòng)畫
- 什么是應(yīng)屆生畢業(yè)生
- 應(yīng)屆生簡(jiǎn)歷自我評(píng)價(jià)
- 應(yīng)屆生簡(jiǎn)歷怎么寫
本類常用軟件
-
福建農(nóng)村信用社手機(jī)銀行客戶端下載下載量:584204
-
Windows優(yōu)化大師下載量:416896
-
90美女秀(視頻聊天軟件)下載量:366961
-
廣西農(nóng)村信用社手機(jī)銀行客戶端下載下載量:365699
-
快播手機(jī)版下載量:325855
每日一囧
本文提供給大家分享的是ASP通用防注入代碼,杜絕SQL注入隱患,提升網(wǎng)站安全,希望對(duì)大家有所幫助。
<%
''''''''''''''''''''''''''''''''''''''''''''''''
'ASP通用防注入代碼
'您可以把該代碼COPY到頭文件中.也可以單獨(dú)作
'為一個(gè)文件存在,每次調(diào)用使用
'作者:y3gu - 2005-7-29
''''''''''''''''''''''''''''''''''''''''''''''''
Dim GetFlag Rem(提交方式)
Dim ErrorSql Rem(非法字符)
Dim RequestKey Rem(提交數(shù)據(jù))
Dim ForI Rem(循環(huán)標(biāo)記)
ErrorSql = "'~;~and~(~)~exec~update~count~*~%~chr~mid~master~truncate~char~declare" Rem(每個(gè)敏感字符或者詞語請(qǐng)使用半角 "~" 格開)
ErrorSql = split(ErrorSql,"~")
If Request.ServerVariables("REQUEST_METHOD")="GET" Then
GetFlag=True
Else
GetFlag=False
End If
If GetFlag Then
For Each RequestKey In Request.QueryString
For ForI=0 To Ubound(ErrorSql)
If Instr(LCase(Request.QueryString(RequestKey)),ErrorSql(ForI))<>0 Then
response.write "<script>alert(""警告:\n請(qǐng)不要使用敏感字符"");location.href=""Sql.asp"";</script>"
Response.End
End If
Next
Next
Else
For Each RequestKey In Request.Form
For ForI=0 To Ubound(ErrorSql)
If Instr(LCase(Request.Form(RequestKey)),ErrorSql(ForI))<>0 Then
response.write "<script>alert(""警告:\n請(qǐng)不要使用敏感字符"");location.href=""Sql.asp"";</script>"
Response.End
End If
Next
Next
End If
%>
''''''''''''''''''''''''''''''''''''''''''''''''
'ASP通用防注入代碼
'您可以把該代碼COPY到頭文件中.也可以單獨(dú)作
'為一個(gè)文件存在,每次調(diào)用使用
'作者:y3gu - 2005-7-29
''''''''''''''''''''''''''''''''''''''''''''''''
Dim GetFlag Rem(提交方式)
Dim ErrorSql Rem(非法字符)
Dim RequestKey Rem(提交數(shù)據(jù))
Dim ForI Rem(循環(huán)標(biāo)記)
ErrorSql = "'~;~and~(~)~exec~update~count~*~%~chr~mid~master~truncate~char~declare" Rem(每個(gè)敏感字符或者詞語請(qǐng)使用半角 "~" 格開)
ErrorSql = split(ErrorSql,"~")
If Request.ServerVariables("REQUEST_METHOD")="GET" Then
GetFlag=True
Else
GetFlag=False
End If
If GetFlag Then
For Each RequestKey In Request.QueryString
For ForI=0 To Ubound(ErrorSql)
If Instr(LCase(Request.QueryString(RequestKey)),ErrorSql(ForI))<>0 Then
response.write "<script>alert(""警告:\n請(qǐng)不要使用敏感字符"");location.href=""Sql.asp"";</script>"
Response.End
End If
Next
Next
Else
For Each RequestKey In Request.Form
For ForI=0 To Ubound(ErrorSql)
If Instr(LCase(Request.Form(RequestKey)),ErrorSql(ForI))<>0 Then
response.write "<script>alert(""警告:\n請(qǐng)不要使用敏感字符"");location.href=""Sql.asp"";</script>"
Response.End
End If
Next
Next
End If
%>
熱門評(píng)論
最新評(píng)論