目前网络上各种注入工具多如牛毛,虽然论坛系统中内置了防注入的手段,但是用户不当的设置和修改仍然可被利用,在BBSGOOD论坛中,所有涉及数据库的页面都用到了conn.asp这个文件,我们在里面加入GET方式防注入的通用代码,可以有效的防止注入攻击.
在 Option Explicit 语句后面,增加以下语句
dim server_name1,script_name1,QUERY_STRING1,FsUrl1server_name1=request.servervariables("server_name")script_name1=request.servervariables("script_name")QUERY_STRING1=Request.ServerVariables("QUERY_STRING")if QUERY_STRING1="" then FsUrl1="http://"&server_name1&script_name1else FsUrl1="http://"&server_name1&script_name1&"?"&QUERY_STRING1end if if instr(1,FsUrl1,"(",1)>0 or instr(1,FsUrl1,"'",1)>0 or instr(1,FsUrl1,"%20or%20",1)>0 or instr(1,FsUrl1,"%20and%20",1)>0 then Response.Write "含有非法字符" Response.Endend if
上面的代码中,过滤了get方式的 (和' 这些
该帖子于2008-12-31 15:24:36被 客服2 编辑过
支持中.谢谢楼主分享.
Both of these wow power leveling characters carry a phenomenal wow power leveling amount of damage and hit wow power leveling points, and you should have at least aion kina one or two on your 5x5 arena buy wow gold team.Hunters and Warlocks are two other gold in wow classes that are great for the arena. Both wow gold eu have pets that can also be used to help wow gold cheap attack and kill other players, and the cheap aion power leveling warlock has many great affliction EVE ISK and curse spells that can help to slow and subdue the other side.