求vb验证码识别代码和资料

sdych6688 2006-10-10 04:32:25
如题
...全文
706 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
oooooo126 2007-03-04
  • 打赏
  • 举报
回复
我能识别老动网论坛的验证码
fyming 2007-03-04
  • 打赏
  • 举报
回复
代google
------------------------------
http://art.unfly.com/show.php?id=3
  ##### 版权所有 转载请保留 谢谢合作
##### 部分程序取自网络
##### 作者:扬子
##### Email: yangzinet@hotmail.com
##### QQ: 21112856
##### WebSite: www.tingfo.net
一共4个页面:form.asp; chk.asp; num.asp; count.asp
得到一个随即数字。加密!
解密后成成XBM图片
利用session 判断
form.asp
<%
'### To encrypt/decrypt include this code in your page
'### strMyEncryptedString = EncryptString(strString)
'### strMyDecryptedString = DeCryptString(strMyEncryptedString)
'### You are free to use this code as long as credits remain in place
'### also if you improve this code let me know.
Private Function EncryptString(strString)
'####################################################################
'### Crypt Function (C) 2001 by Slavic Kozyuk grindkore@yahoo.com ###
'### Arguments: strString <--- String you wish to encrypt ###
'### Output: Encrypted HEX string ###
'####################################################################
Dim CharHexSet, intStringLen, strTemp, strRAW, i, intKey, intOffSet
Randomize Timer
intKey = Round((RND * 1000000) + 1000000) '##### Key Bitsize
intOffSet = Round((RND * 1000000) + 1000000) '##### KeyOffSet Bitsize
If IsNull(strString) = False Then
strRAW = strString
intStringLen = Len(strRAW)
For i = 0 to intStringLen - 1
strTemp = Left(strRAW, 1)
strRAW = Right(strRAW, Len(strRAW) - 1)
CharHexSet = CharHexSet & Hex(Asc(strTemp) * intKey)& Hex(intKey)
Next
EncryptString = CharHexSet & "|" & Hex(intOffSet + intKey) & "|" &
Hex(intOffSet)
Else
EncryptString = ""
End If
End Function
Private Function DeCryptString(strCryptString)
'####################################################################
'### Crypt Function (C) 2001 by Slavic Kozyuk grindkore@yahoo.com ###
'### Arguments: Encrypted HEX stringt ###
'### Output: Decrypted ASCII string ###
'####################################################################
'### Note this function uses HexConv() and get_hxno() functions ###
'### so make sure they are not removed ###
'####################################################################
Dim strRAW, arHexCharSet, i, intKey, intOffSet, strRawKey, strHexCrypData
strRawKey = Right(strCryptString, Len(strCryptString) - InStr(strCryptString,
"|"))
intOffSet = Right(strRawKey, Len(strRawKey) - InStr(strRawKey,"|"))
intKey = HexConv(Left(strRawKey, InStr(strRawKey, "|") - 1)) -
HexConv(intOffSet)
strHexCrypData = Left(strCryptString, Len(strCryptString) - (Len(strRawKey) +
1))
arHexCharSet = Split(strHexCrypData, Hex(intKey))
For i=0 to UBound(arHexCharSet)
strRAW = strRAW & Chr(HexConv(arHexCharSet(i))/intKey)
Next
DeCryptString = strRAW
End Function
Private Function HexConv(hexVar)
Dim hxx, hxx_var, multiply
IF hexVar <> "" THEN
hexVar = UCASE(hexVar)
hexVar = StrReverse(hexVar)
DIM hx()
REDIM hx(LEN(hexVar))
hxx = 0
hxx_var = 0
FOR hxx = 1 TO LEN(hexVar)
IF multiply = "" THEN multiply = 1
hx(hxx) = mid(hexVar,hxx,1)
hxx_var = (get_hxno(hx(hxx)) * multiply) + hxx_var
multiply = (multiply * 16)
NEXT
hexVar = hxx_var
HexConv = hexVar
END IF
End Function
Private Function get_hxno(ghx)
If ghx = "A" Then
ghx = 10
ElseIf ghx = "B" Then
ghx = 11
ElseIf ghx = "C" Then
ghx = 12
ElseIf ghx = "D" Then
ghx = 13
ElseIf ghx = "E" Then
ghx = 14
ElseIf ghx = "F" Then
ghx = 15
End If
get_hxno = ghx
End Function
%>
<%
randomize
num = int(7999*rnd+2000) '计数器的值
num2 = EncryptString(num)
session("pwdt")=num
%>
<form action="chk.asp" method=post>
请输入验证码: <input type="text" name="pwds">
<img src="count.asp?sksid=<%=num2%>"> <input type=submit value=提交>
</form>
chk.asp
<%
if trim(request.form("pwds"))<>trim(session("pwdt")) then
%>
输入错误: 应该为:<%=session("pwdt")%>,可你输入的是:<%=request.form("pwds")%>
<%
else
%>
输入正确
<%end if%>



asp
验证码的程序及原理
http://art.unfly.com/show.php?id=3
嗷嗷叫的老马 2007-03-04
  • 打赏
  • 举报
回复
.................
清晨曦月 2007-03-04
  • 打赏
  • 举报
回复
呵呵...这个我也研究了好久才告终了....不过核心是朋友用VC写的
happy_sea 2006-10-10
  • 打赏
  • 举报
回复
验证码识别通常没有通用的代码,你可以用那个网站的名字和“验证码 识别”为关键字在baidu或者google搜一下。

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧