佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > asp實(shí)現(xiàn)防止從外部提交數(shù)據(jù)的三種方法第1/3頁

asp實(shí)現(xiàn)防止從外部提交數(shù)據(jù)的三種方法第1/3頁

熱門標(biāo)簽:阿里云 Mysql連接數(shù)設(shè)置 服務(wù)器配置 科大訊飛語音識別系統(tǒng) Linux服務(wù)器 銀行業(yè)務(wù) 團(tuán)購網(wǎng)站 電子圍欄
防止從外部提交數(shù)據(jù)的方法

第一種做法,屏蔽特殊字符和關(guān)鍵字

fqys=request.servervariables("query_string") 

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)="%" 

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 "script language=""javascript"">" 

response.write "parent.alert('很抱歉!你正在試圖攻擊本服務(wù)器或者想取得本服務(wù)器最高管理權(quán)!將直接轉(zhuǎn)向首頁..');" 

response.write "self.location.href='default.asp';" 

response.write "/script>" 

response.end 

end if 
123下一頁閱讀全文

標(biāo)簽:棗莊 衢州 蚌埠 大理 廣元 衡水 萍鄉(xiāng) 江蘇

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp實(shí)現(xiàn)防止從外部提交數(shù)據(jù)的三種方法第1/3頁》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    衡山县| 曲水县| 深圳市| 印江| 金平| 盐源县| 商水县| 长汀县| 油尖旺区| 略阳县| 贞丰县| 衢州市| 西安市| 白山市| 绵阳市| 福海县| 凤阳县| 偃师市| 通海县| 吉林省| 仪征市| 贵溪市| 南通市| 兴宁市| 乳山市| 营山县| 洞口县| 开化县| 西和县| 新田县| 卓资县| 陇西县| 闽清县| 祁连县| 瑞安市| 清水县| 延吉市| 武平县| 鄢陵县| 田阳县| 简阳市|