作家
登录

asp实现防止从外部提交数据的三种方法第1/3页

作者: 来源:www.28hudong.com 2013-03-30 08:32:24 阅读 我要评论

防止从外部提交数据的方法 第一种做法,屏蔽特殊字符和关键字 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('很抱歉!你正在试图攻击本服务器或者想取得本服务器最高管理权!将直接转向首页..');" response.write "self.location.href='default.asp';" response.write "</script>" response.end end if

  推荐阅读

  asp下用datediff实现计算两个时间差的函数

计算两个时间差的函数 '****************************** '||Function TimeDiff(sBegin, sEnd) '||本函数计算两个时间的差,可以不用更改直接使用 '||作者:machinecat 2001/10/26 '******************************>>>详细阅读


本文标题:asp实现防止从外部提交数据的三种方法第1/3页

地址:http://www.17bianji.com/kaifa2/ASP/32336.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)