=1thenurl=Replace(url,";",";")..." />
 手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp中一段防SQL注入的通用脚本
asp中一段防SQL注入的通用脚本
摘要:'屏蔽通过地址栏攻击url=Request.ServerVariables("QUERY_STRING")ifinstr(url,";")>...

'屏蔽通过地址栏攻击

url=Request.ServerVariables("QUERY_STRING")

ifinstr(url,";")>=1then

url=Replace(url,";",";"):Response.Redirect("?"&url)

endif

'屏蔽通过表单攻击

foreachiteminrequest.form

stritem=lcase(server.HTMLEncode(Request.form(item)))

ifinstr(stritem,"select")>=1orinstr(stritem,"insert")>=1orinstr(stritem,"update")>=1orinstr(stritem,"delete")>=1orinstr(stritem,"exec")>=1orinstr(stritem,"declare")>=1then

response.write("对不起,请不要输入非法字符!")

response.end

endif

next

【asp中一段防SQL注入的通用脚本】相关文章:

一段在asp中加密与解密对应的函数

一段采集程序代码

ASP防止SQL注入方法

在ASP中连接MySQL数据库,最好的通过ODBC方法

asp中创建多级目录的两段代码

asp数据库防下载处理

asp 防止SQL注入代码

几个经典的ASP应用

ASP中Cache技术的应用

asp中实现随机分组程序的代码

精品推荐
分类导航