黑耀镜の恶魔城

查看: 2550|回复: 19

[分享]加强认证码

[复制链接]
发表于 2005-7-5 16:22:11 | 显示全部楼层 |阅读模式
2016-8-8 16:40 编辑 <br /><br />&lt&gt;鉴于暴力营销已经发到了这里……&lt;/P&gt;
&lt&gt;推广一下自制的认证码加强补丁……&lt;/P&gt;
&lt&gt;测试:&lt;/P&gt;
&lt&gt;asp文件找不到了&lt;/P&gt;
&lt&gt;不过把这个放到dvbbs的getcode.asp里也不难吧&lt;/P&gt;
方法:修改getcode.asp
&lt;%
Option Explicit
Response.buffer=true
NumCode
Function NumCode()
&nbsp;  Response.Expires = -1
&nbsp;  Response.AddHeader &quotragma&quot;,&quot;no-cache&quot;
&nbsp;  Response.AddHeader &quot;cache-ctrol&quot;,&quot;no-cache&quot;
&nbsp;  On Error Resume Next
&nbsp;  Dim zNum,i,j
&nbsp;  Dim Ados,Ados1
&nbsp;  Randomize timer
&nbsp;  zNum = cint(8999*Rnd+1000)
&nbsp;  Session(&quot;GetCode&quot;) = zNum
&nbsp;  Dim zimg(4),NStr
&nbsp;  NStr=cstr(zNum)
&nbsp;  For i=0 To 3
&nbsp;  &nbsp;   zimg(i)=cint(mid(NStr,i+1,1))
&nbsp;  Next
&nbsp;  Dim Pos
&nbsp;  Set Ados=Server.CreateObject(&quot;Adodb.Stream&quot;)
&nbsp;  Ados.Mode=3
&nbsp;  Ados.Type=1
&nbsp;  Ados.Open
&nbsp;  Set Ados1=Server.CreateObject(&quot;Adodb.Stream&quot;)
&nbsp;  Ados1.Mode=3
&nbsp;  Ados1.Type=1
&nbsp;  Ados1.Open
&nbsp;  Ados.LoadFromFile(Server.mappath(&quot;images/body.Fix&quot;))
&nbsp;  Ados1.write Ados.read(1280)
&nbsp;  For i=0 To 3
&nbsp;  &nbsp;   Ados.Position=(9-zimg(i))*320
&nbsp;  &nbsp;   Ados1.Position=i*320
&nbsp;  &nbsp;   Ados1.write ados.read(320)
&nbsp;  Next &nbsp;  
&nbsp;  Ados.LoadFromFile(Server.mappath(&quot;images/head.fix&quot;))
&nbsp;  Pos=lenb(Ados.read())
&nbsp;  Ados.Position=Pos
&nbsp;  For i=0 To 9 Step 1
&nbsp;  &nbsp;   For j=0 To 3
&nbsp;  &nbsp;  &nbsp;  &nbsp; Ados1.Position=i*32+j*320
&nbsp;  &nbsp;  &nbsp;  &nbsp; Ados.Position=Pos+30*j+i*120
&nbsp;  &nbsp;  &nbsp;  &nbsp; Ados.write ados1.read(30)
&nbsp;  &nbsp;   Next
&nbsp;  Next
&nbsp;  Response.ContentType = &quot;image/BMP&quot;
&nbsp;  Ados.Position=0
&nbsp;  Response.BinaryWrite Ados.read()
&nbsp;  Ados.Close:set Ados=nothing
&nbsp;  Ados1.Close:set Ados1=nothing
&nbsp;  If Err Then Session(&quot;GetCode&quot;) = 9999
End Function
&#39;Asp code Created by BlueIdea.COM Web Team V37 2003-7-25
%&gt;

发表于 2005-7-5 18:34:00 | 显示全部楼层
2016-8-8 16:40 编辑 <br /><br /><P>听起来不错!</P>

发表于 2005-7-5 18:48:00 | 显示全部楼层
论坛认证码给关掉 了,很多人不喜欢认证,不过这个是猴子自己写的??
 楼主| 发表于 2005-7-8 13:48:00 | 显示全部楼层
2016-8-8 16:40 编辑 <br /><br /><P>嗯……</P><P>关键是通过注册认证防止程序自动注册……</P>

发表于 2005-7-8 23:36:00 | 显示全部楼层
<>猴子……我又闯祸了……我去谢罪了……[em48]</P>
发表于 2005-7-9 03:11:00 | 显示全部楼层
2016-8-8 16:40 编辑 <br /><br /><DIV class=quote><B>以下是引用<I>goenitzchild</I>在2005-7-8 23:36:00的发言:</B>
<P>猴子……我又闯祸了……我去谢罪了……[em48]</P></DIV>
<P>没这么严重
<P>族长来了
<P>PS:你在跑题</P>

发表于 2005-7-10 00:44:00 | 显示全部楼层
<>你的头像真猥琐……</P><>没事没事……偶尔跑题正常……</P>
发表于 2005-7-10 02:53:00 | 显示全部楼层
2016-8-8 16:40 编辑 <br /><br /><DIV class=quote><B>以下是引用<I>goenitzchild</I>在2005-7-10 0:44:00的发言:</B>
<P>你的头像真猥琐……</P>
<P>没事没事……偶尔跑题正常……</P></DIV>
<P>
<P>自产自销</P>
<P>猥琐教主怎么可能不猥琐呢</P>[em06]

发表于 2005-7-10 08:47:00 | 显示全部楼层
2016-8-8 16:40 编辑 <br /><br /> 哦  加认证码还行   我已经在某地习惯认证码了

发表于 2005-7-10 09:05:00 | 显示全部楼层
2016-8-8 16:40 编辑 <br /><br /><P>加吧,严重支持</P><P>受不了那些广告了</P>

*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|主页

GMT+8, 2024-5-5 00:14

Powered by Discuz! X3.4

Copyright © 2003 CVCV.NET. all rights reserved.

快速回复 返回顶部 返回列表