通用asp防注入程序
‘防注入把它加到conn里这样就ok了
dim sql_injdata
SQL_injdata = "’|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
Response.Write "<Script>alert(‘请不要在参数中包含非法字符尝试注入!’);history.back(-1)</Script>"
Response.end
end if
next
Next
End If
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
Response.Write "<Script>alert(‘请不要在参数中包含非法字符尝试注入!’);history.back(-1)</Script>"
Response.end
end if
next
next
end if
相关文档:
<%
'┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
'┃ ┃
'┃ 摘 要: 统计图--曲线图 &n ......
由于现在在公司负责制作标准的静态页面,为了增强客户体验,所以经常要做些AJAX效果,也学你也和我一样在,学习AJAX。而设计AJAX时使用的一个重要的技术(工具)就是XMLHTTPRequest对象了。这里海啸把我学习XMLHTTPRequest对象的一点资料拿出来跟大家一起分享。文中的资料都是海啸在学习时在网上收集的,如果您开过,那就再 ......
<%
yourip=Request.ServerVariables("REMOTE_ADDR")
if yourip="111.111.111.111" then
Response.Redirect ("http://www.baidu.com")
end if
%>
Dim UserIP
UserIP = Request.ServerVariables("Http_X_Forwarded_For")
If UserIP = "" Then UserIP = Request.ServerVariables("Remote_Addr") : User ......
ASP实现同一虚拟主机空间安放多个网站的方法
现在的域名很便宜,不少朋友手里多少都有几个,如果您想用手中的几个域名做多个网站的话,并不用同时购买多个虚拟主机,您只要先将您所有的域名绑定到您的虚拟主机上,然后将虚拟主机根目录中的index.asp(首页文件)里加入下列代码就可以了:
<%
sn=lcase(Request.Se ......