防止用大小写字母重账号来冲掉仓库的解决方法
昨天看了一整天这个话题,很多人是用修改SQL数据库的排列方式来处理,我发现这里有个很大的毛病,我们区分大小写,是特意的,是用来防止096的复制的,如果你恢复了,别人用096的main.exe进入你的MU,你就又能给人复制了,所以,我昨天想了一天,结果想到这个方法,在注册页面禁止所有大写字母的注册,这虽然很笨,但很实用~~
以下用普遍使用的时速作个修改代码给大家:
修改idreg.asp里的判断语句,如果是以前的时速的ASP里,就应在
if Checkchinese(ps_loginname)=1 then
errormsg="您设定的用户帐号名只能是英文和数字,不能有中文!" & errormsg
end if
下面加上这个
if Instr(ps_loginname,"select")>0 or Instr(ps_loginname,"table")>0 or Instr(ps_loginname,"update")>0 or Instr(ps_loginname,"delete")>0 or Instr(ps_loginname,"drop")>0 or Instr(ps_loginname,"****")>0 or Instr(ps_loginname,"admin")>0 or Instr(ps_loginname,"A")>0 or Instr(ps_loginname,"B")>0 or Instr(ps_loginname,"C")>0 or Instr(ps_loginname,"D")>0 or Instr(ps_loginname,"E")>0 or Instr(ps_loginname,"F")>0 or Instr(ps_loginname,"G")>0 or Instr(ps_loginname,"H")>0 or Instr(ps_loginname,"I")>0 or Instr(ps_loginname,"J")>0 or Instr(ps_loginname,"K")>0 or Instr(ps_loginname,"L")>0 or Instr(ps_loginname,"M")>0 or Instr(ps_loginname,"N")>0 or Instr(ps_loginname,"O")>0 or Instr(ps_loginname,"P")>0 or Instr(ps_loginname,"Q")>0 or Instr(ps_loginname,"R")>0 or Instr(ps_loginname,"S")>0 or Instr(ps_loginname,"T")>0 or Instr(ps_loginname,"U")>0 or Instr(ps_loginname,"V")>0 or Instr(ps_loginname,"W")>0 or Instr(ps_loginname,"X")>0 or Instr(ps_loginname,"Y")>0 or Instr(ps_loginname,"Z")>0 or Instr(ps_loginname,"GM")>0 or Instr(ps_loginname,"gm")>0 then
errormsg="<br>账号中包括大写或不可注册的字符,请换用小写,请更换!<br>" & errormsg
end if
商业完整版游戏发布站程序免费下载:www.98youx.com
以下用普遍使用的时速作个修改代码给大家:
修改idreg.asp里的判断语句,如果是以前的时速的ASP里,就应在
if Checkchinese(ps_loginname)=1 then
errormsg="您设定的用户帐号名只能是英文和数字,不能有中文!" & errormsg
end if
下面加上这个
if Instr(ps_loginname,"select")>0 or Instr(ps_loginname,"table")>0 or Instr(ps_loginname,"update")>0 or Instr(ps_loginname,"delete")>0 or Instr(ps_loginname,"drop")>0 or Instr(ps_loginname,"****")>0 or Instr(ps_loginname,"admin")>0 or Instr(ps_loginname,"A")>0 or Instr(ps_loginname,"B")>0 or Instr(ps_loginname,"C")>0 or Instr(ps_loginname,"D")>0 or Instr(ps_loginname,"E")>0 or Instr(ps_loginname,"F")>0 or Instr(ps_loginname,"G")>0 or Instr(ps_loginname,"H")>0 or Instr(ps_loginname,"I")>0 or Instr(ps_loginname,"J")>0 or Instr(ps_loginname,"K")>0 or Instr(ps_loginname,"L")>0 or Instr(ps_loginname,"M")>0 or Instr(ps_loginname,"N")>0 or Instr(ps_loginname,"O")>0 or Instr(ps_loginname,"P")>0 or Instr(ps_loginname,"Q")>0 or Instr(ps_loginname,"R")>0 or Instr(ps_loginname,"S")>0 or Instr(ps_loginname,"T")>0 or Instr(ps_loginname,"U")>0 or Instr(ps_loginname,"V")>0 or Instr(ps_loginname,"W")>0 or Instr(ps_loginname,"X")>0 or Instr(ps_loginname,"Y")>0 or Instr(ps_loginname,"Z")>0 or Instr(ps_loginname,"GM")>0 or Instr(ps_loginname,"gm")>0 then
errormsg="<br>账号中包括大写或不可注册的字符,请换用小写,请更换!<br>" & errormsg
end if
商业完整版游戏发布站程序免费下载:www.98youx.com
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论