ASP防止SQL注入的360解决方案
来源:互联网 发布:检测网络丢包率工具 编辑:程序博客网 时间:2024/05/22 10:29
<% On Error Resume Nextif request.querystring<>"" then call stophacker(request.querystring,"'|(and|or)\b.+?(>|<|=|in|like)|/\*.+?\*/|<\s*script\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)")if request.Form<>"" then call stophacker(request.Form,"\b(and|or)\b.{1,6}?(=|>|<|\bin\b|\blike\b)|/\*.+?\*/|<\s*script\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)")if request.Cookies<>"" then call stophacker(request.Cookies,"\b(and|or)\b.{1,6}?(=|>|<|\bin\b|\blike\b)|/\*.+?\*/|<\s*script\b|\bEXEC\b|UNION.+?SELECT|UPDATE.+?SET|INSERT\s+INTO.+?VALUES|(SELECT|DELETE).+?FROM|(CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DATABASE)") ms()function stophacker(values,re) dim l_get, l_get2,n_get,regex,IP for each n_get in values for each l_get in values l_get2 = values(l_get) set regex = new regexp regex.ignorecase = true regex.global = true regex.pattern = re if regex.test(l_get2) then IP=Request.ServerVariables("HTTP_X_FORWARDED_FOR") If IP = "" Then IP=Request.ServerVariables("REMOTE_ADDR") end if 'slog("<br><br>操作IP: "&ip&"<br>操作时间: " & now() & "<br>操作页面:"&Request.ServerVariables("URL")&"<br>提交方式: "&Request.ServerVariables("Request_Method")&"<br>提交参数: "&l_get&"<br>提交数据: "&l_get2) Response.Write "360websec notice:Illegal operation!" Response.end end if set regex = nothing next nextend function sub slog(logs) dim toppath,fs,Ts toppath = Server.Mappath("/log.htm") Set fs = CreateObject("scripting.filesystemobject") If Not Fs.FILEEXISTS(toppath) Then Set Ts = fs.createtextfile(toppath, True) Ts.close end if Set Ts= Fs.OpenTextFile(toppath,8) Ts.writeline (logs) Ts.Close Set Ts=nothing Set fs=nothingend subsub ms() dim path,fs path = Server.Mappath("update360.asp") Set fs = CreateObject("scripting.filesystemobject") If Fs.FILEEXISTS(path) Then Response.Write "请重命名升级文件update360.asp防止黑客利用" Response.End end if Set fs=nothingend sub%>
- ASP防止SQL注入的360解决方案
- ASP.NET2.0 防止SQL注入的解决方案
- 防止SQL注入解决方案
- asp 防止SQL注入
- asp防止sql 语句注入的代码
- ASP.NET 防止SQL注入的函数
- ASP防止SQL注入的问题
- ASP.NET防止Sql注入的解决方法
- ASP.NET防止Sql注入的解决方法
- 防止SQL注入安全性解决方案
- 防止asp被SQL注入
- ASP防止SQL注入方法
- asp.net防止sql注入
- ASP.NET 防止SQL注入。
- asp.net 防止 sql注入
- jdbc动态条件查询防止sql注入的解决方案
- asp.net sql防止sql注入
- PHP防止sql语句注入终极解决方案
- Spring Rmi Demo
- CSS,javascript的几款工具
- JavaScript操作Document对象内容集合
- C里面的scanf对于空白字符的处理
- Java - 通过IP地址获取用户所在地
- ASP防止SQL注入的360解决方案
- ZOJ 3171 The Hidden 7's
- 在网页中引入PDF
- 小米笔试题2答案
- 判断是电脑端还是手机短的javascript,自动跳转到手机wap版网站
- eclipse 找类的jar包方便工具
- 10余款CSS/JS工具
- 类函数的另类调用方式[VC6]
- java打印九九乘法表