手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp实现防止从外部提交数据的三种方法第1/3页
asp实现防止从外部提交数据的三种方法第1/3页
摘要:防止从外部提交数据的方法第一种做法,屏蔽特殊字符和关键字fqys=request.servervariables("query_string...

防止从外部提交数据的方法

第一种做法,屏蔽特殊字符和关键字

fqys=request.servervariables("query_string")

dimnothis(18)

nothis(0)="netuser"

nothis(1)="xp_cmdshell"

nothis(2)="/add"

nothis(3)="exec%20master.dbo.xp_cmdshell"

nothis(4)="netlocalgroupadministrators"

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

fori=0toubound(nothis)

ifinstr(FQYs,nothis(i))<>0then

errc=true

endif

next

iferrcthen

response.write"<scriptlanguage=""javascript"">"

response.write"parent.alert('很抱歉!你正在试图攻击本服务器或者想取得本服务器最高管理权!将直接转向首页..');"

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

response.write"</script>"

response.end

endif

当前1/3页123下一页阅读全文

【asp实现防止从外部提交数据的三种方法第1/3页】相关文章:

九种防MDB数据库被下载的方法小结

asp.net计算每个页面执行时间的方法

如何从数据库中随机取出10条记录的方法

另类的文件上传解决方案

asp 导航excel数据到mssql access mysql 等数据方法

简单的ASP中经常用到的代码[推荐]第1/4页

用asp实现文件浏览、上传、下载的程序

用asp实现检测文件编码

利用ASP发送和接收XML数据的处理方法

asp实现防止站外提交内容的两个方法

精品推荐
分类导航