找回密码
 加入
搜索
查看: 4521|回复: 11

自动登陆点卡交易平台的验证码怎样处理

 火.. [复制链接]
发表于 2010-1-9 21:31:04 | 显示全部楼层 |阅读模式
本帖最后由 jycel 于 2010-1-9 21:52 编辑

平台地址:http://www.4688.com.cn
谁帮忙处理下验证码问题!下载下来了和网页显示不一样……
从没做过IE相关操作,看了下帮助,账号和密码能自动输入了,验证码暂还不晓得咱弄,还就一个就是点击登陆没反应!
临时
账号是:jycel
密码为:123456
#include <IE.au3>
; Create a browser window and navigate to hotmail
$oIE = _IECreate ("http://www.4688.com.cn",1,1,1)
InetGet("http://www.4688.com.cn/Modules/RandomImage.aspx?colorb=999999&colorf=000000", @ScriptDir & "\1.jpg,8,1");下载验证码
; get pointers to the login form and username, password and signin fields
$o_form = _IEFormGetObjByName ($oIE, "aspnetForm")
$o_login = _IEFormElementGetObjByName ($o_form, "Blue30Login$txtLoginAccount")
$o_login1 = _IEFormElementGetObjByName ($o_form, "Blue30Login_txtEmpAccount")
$o_password = _IEFormElementGetObjByName ($o_form, "Blue30Login_txtPassword")
$o_signin = _IEFormElementGetObjByName ($o_form, "Blue30Login$btnLogin")
$username = "jycel"
$username1 = "jycel"
$password = "123456"
; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_login1, $username1)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")
发表于 2010-1-12 10:21:00 | 显示全部楼层
用POST 就可以了
 楼主| 发表于 2010-1-12 10:27:40 | 显示全部楼层
用POST 就可以了
guland 发表于 2010-1-12 10:21

我去搜索下!还有点不明白,没了解过这方面知识!
发表于 2010-1-13 10:48:09 | 显示全部楼层
这个验证码识别很简单的

以前有人发过类似贴,刚翻出来,两网站类似
http://www.autoitx.com/forum.php ... p;extra=&page=1
 楼主| 发表于 2010-1-13 14:45:08 | 显示全部楼层
本帖最后由 jycel 于 2010-1-13 15:05 编辑

回复 4# bob
我试了下可以读取,但是我换成我这地址读取就空的!不知道是获取图片地址不对?
http://www.autoitx.com/forum.php ... p;extra=&page=2例子中验证码图片是BMP图片,我这个是GIF的!
还有就是点击登陆按钮没反应!
#include <IE.au3>
#include <OCR.au3>

Dim $i=0
$oIE = _IECreate ("http://www.4688.com.cn",1,1,1)
$oImgs = _IEImgGetCollection ($oIE)
For $oImg In $oImgs
        $i+=1
        If $oImg.src="http://www.4688.com.cn/Modules/RandomImage.aspx?colorb=999999&colorf=000000" Then
           $oPic = $oIE.Document.body.createControlRange()
           $oPic.Add($oImg)
           $oPic.execCommand("Copy")
           $img = ClipGet()
        EndIf
Next

$a_Image = myReadImageToArray($img, True, 1, 0xeeeeee)
$s_code_string = myArrarOCR(@ScriptDir&"\CodeFont.txt", $a_Image, 1, 4, 5, "", 0, 5, 0, 0)

$o_form = _IEFormGetObjByName ($oIE, "aspnetForm")
$o_login = _IEFormElementGetObjByName ($o_form, "Blue30Login$txtLoginAccount")
$o_login1 = _IEFormElementGetObjByName ($o_form, "Blue30Login_txtEmpAccount")
$o_password = _IEFormElementGetObjByName ($o_form, "Blue30Login_txtPassword")
$dt_password = _IEFormElementGetObjByName ($o_form, "Blue30Login_txtExtCode")
$o_signin = _IEFormElementGetObjByName ($o_form, "Blue30Login$btnLogin")
$username = "jycel"
$username1 = "jycel"
$password = "123456"
; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_login1, $username1)
_IEFormElementSetValue ($o_password, $password)
_IEFormElementSetValue ($dt_password, $s_code_string)
_IEAction ($o_signin, "click")
MsgBox(0,"",$s_code_string)
Exit

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2010-1-19 14:05:28 | 显示全部楼层
不错,下下来学习
发表于 2010-1-25 18:22:15 | 显示全部楼层
学习。。。。。。。。。。
发表于 2010-1-26 14:46:47 | 显示全部楼层
验证码获取:
#include <ie.au3>

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", "1407", "REG_DWORD", 0)
;ie7以上且安全设置中高以上需要这句

$oIE = _IECreate("http://www.4688.com.cn/")
$oImg = _IEImgGetCollection ($oIE, 11)
$oPic = $oIE.Document.Body.CreateControlRange()
$oPic.Add($oImg)
$oPic.Select()
$oPic.ExecCommand("Copy");复制到剪贴板
FileCopy(ClipGet(),@ScriptDir&"\code.gif",1)
发表于 2010-2-10 18:07:24 | 显示全部楼层
多谢楼上的兄弟提供验证码获取方法
发表于 2010-2-11 00:10:36 | 显示全部楼层
看看这个,
发表于 2010-2-12 20:19:18 | 显示全部楼层
看看什么号东西
发表于 2010-3-25 21:45:50 | 显示全部楼层
楼主最后成功了么?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 09:39 , Processed in 0.079709 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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