- //打码账号,密码,图片地址,图片类型
- function 打码兔(user,password,imgVcode,VcodeType)
- code=""
- if(help.regdll("rc:Dama2.dll",true))
- Dama2 = com("Dama2Ctrl")
- Dama2.SoftwareID = "8bbb99499051b46d0a02a5f08da09b23"
- result = Dama2.D2File2(user, password, imgVcode,30,VcodeType)
- var rstr
- isok = str.split(result, ",", rstr)
- if (isok)
- ID=rstr[0]
- Vcode=rstr[1]
- if(str.strleng(Vcode)==4)
- //9宫格验证码转换
- if(VcodeType==108)
- code=打码.RepJiuGongGeNum(Vcode)
- else
- code=Vcode
- endif
- else
- //如果答案不正确,请调用下面的报错函数,返还用户题分
- Dama2.ReportResult(ID, 0)
- code="验证码错误"
- endif
- else
- code="验证码错误"
- endif
- Dama2.Uninit()
- else
- code="插件注册失败"
- endif
- return code
- endfunction
- //替换九宫格验证码
- function RepJiuGongGeNum(Vcode)
- if(Vcode=="NULL")
- return "NULL"
- else
- num1=str.strsub(Vcode,0,1)
- num2=str.strsub(Vcode,1,2)
- num3=str.strsub(Vcode,2,3)
- num4=str.strsub(Vcode,3,4)
- arrNum=array[10]
- arrNum[0]="0"
- arrNum[1]="00000000"
- arrNum[2]="00010000"
- arrNum[3]="00020000"
- arrNum[4]="00000001"
- arrNum[5]="00010001"
- arrNum[6]="00020001"
- arrNum[7]="00000002"
- arrNum[8]="00010002"
- arrNum[9]="00020002"
- num=arrNum[num1]&arrNum[num2]&arrNum[num3]&arrNum[num4]
- return num
- endif
- endfunction
复制代码 以前的4.3的打码兔代码。自己可以修改用用 |