ASP防止GET,Post注入和防止服務(wù)器攻擊,并記錄IP(3)_ASP教程
推薦:ASP將IP地址最后一位替換成星號(hào)實(shí)例代碼先將IP地址存入數(shù)據(jù)庫,然后取出來,效果如圖: 代碼如下: % '來源 ipstr= rs(cIP) ipstr=split(ipstr,.,-1,1) ipstrout=ipstr(0).ipstr(1).ipstr(2).* response.write ipstrout %
'記錄Get攻擊結(jié)束
Response.Write "<Script Language=JavaScript>alert('警告:此操作已被記錄! 提示:GET傳值請(qǐng)不要在參數(shù)中包含非法字符【"&replace(Fy_Inf(Fy_Xh),"'","’")&"】. 頁面將返回!');history.go(- 1);</Script>"
response.End()
End If
Next
Next
end if
'防注入系統(tǒng)
dim Zqs,Zerrc,Ziii,zurl
Zqs=request.servervariables("query_string")
zurl=Request.ServerVariables("URL")
dim Znothis(60)
Znothis(0)="net user"
Znothis(1)="@a"
Znothis(2)="/add"
Znothis(3)="exec%20master.dbo.xp_cmdshell"
Znothis(4)="net localgroup administrators"
Znothis(5)="select"
Znothis(6)="count"
Znothis(7)="asc"
Znothis(8)="char"
Znothis(9)="mid"
Znothis(10)="cscript.exe"
Znothis(11)="declare"
Znothis(12)="insert"
Znothis(13)="delete"
Znothis(14)="drop"
Znothis(15)="truncate"
Znothis(16)="wscript.shell"
Znothis(17)="%20"
Znothis(18)=" "
Znothis(19)="script"
Znothis(20)="system32"
Znothis(21)="CmdShell"
Znothis(22)="sysadmin"
Znothis(23)="serveradmin"
Znothis(24)="setupadmin"
Znothis(25)="securityadmin"
Znothis(26)="diskadmin"
Znothis(27)="bulkadmin"
Znothis(28)="exec master.dbo.sp_addlogin"
Znothis(29)="exec master.dbo.sp_password"
Znothis(30)="exec master.dbo.sp_addsrvrolemember"
Znothis(31)="create"
Znothis(32)="exec xp_reg"
Znothis(33)="backup"
Znothis(34)="net localgroup administrators"
Znothis(35)="Asc"
Znothis(36)="+dir+"
Znothis(37)="drop table"
Znothis(38)="exec master.dbo.sp_addextendedproc"
Znothis(39)="master.dbo.sysobjects"
Znothis(40)="master.dbo.xp_regwrite"
Znothis(41)="master.dbo.sysdatabases"
Znothis(42)="DECLARE"
Znothis(43)="EXEC sp_oacreate"
Znothis(44)="EXEC sp_oamethod"
Znothis(45)="xp_"
Znothis(46)="Sp_"
Znothis(47)="%2B"
Znothis(48)="Sp_OAGetErrorInfo"
Znothis(49)="Sp_OAGetProperty"
Znothis(50)="Sp_OAMethod"
Znothis(51)="Sp_OASetProperty"
Znothis(52)="Sp_OAStop"
Znothis(53)="Xp_regaddmultistring"
Znothis(54)="Xp_regdeletekey"
Znothis(55)="Xp_regdeletevalue"
Znothis(56)="Xp_regenumvalues"
Znothis(57)="Xp_regread"
Znothis(58)="Xp_regremovemultistring"
Znothis(59)="Xp_regwrite"
Znothis(60)="insert into"
分享:全角半角轉(zhuǎn)換代碼javascript轉(zhuǎn)換: SCRIPT /* **************************** * 參數(shù)說明: * str:要轉(zhuǎn)換的字符串 * flag:標(biāo)記,為0時(shí)半轉(zhuǎn)全,為非0時(shí)全轉(zhuǎn)半 * 返回值類型:字符串 **************************** */ function DBC2SBC(str,flag) { var i; var result=''; if (
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- 分享:XML HTTP Request的屬性和方法簡(jiǎn)介
- 怎樣隱藏圖片的真實(shí)地址
- ASP使用FCKEditor的設(shè)置技巧
- ASP 與ASP有什么不同
- asp實(shí)現(xiàn)后臺(tái)添加wma視頻文件前臺(tái)顯示
- 用ASP木馬實(shí)現(xiàn)FTP和解壓縮
- 總是彈出visual studio 實(shí)時(shí)調(diào)試器 三種解決辦法
- ASP教程:解決ASP腳本運(yùn)行超時(shí)的方法
- ASP應(yīng)用進(jìn)階 ASP Error對(duì)象的相關(guān)知識(shí)
- 動(dòng)態(tài)網(wǎng)頁愛好者來看:Asp過濾HTML的函數(shù)
- 相關(guān)鏈接:
- 教程說明:
ASP教程-ASP防止GET,Post注入和防止服務(wù)器攻擊,并記錄IP(3)
。