|
很多小黑客利用英雄排行漏洞进行入侵私服主页,修改数据据,把服务器弄得乱七八糟,原因很简单,跟着我入手!
漏洞是没有对job和sx的判断
在你的top100.asp前面加入
<%
set rs=server.createobject("adodb.recordset")
job=request("job")
sx=request("sx")
hk=0
if instr(job,"")<>0 then hk=1
if instr(job,"=")<>0 then hk=1
if instr(job,"%")<>0 then hk=1
if len(job)>2 then hk=1
if instr(sx,"")<>0 then hk=1
if instr(sx,"=")<>0 then hk=1
if instr(sx,"%")<>0 then hk=1
if len(sx)>9 then hk=1
if hk=1 then
response.write "<script language=javascript>alert(\n\n请不要尝试任何入侵方式!);history.back()</script>"
response.end
end if
%>
记得加强SQL和ASP的知识,不光是奇迹私服,做网站,做别的私服也一样!大多数游戏WEB都是ASP写的!
|