自动登陆点卡交易平台的验证码怎样处理
本帖最后由 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") 用POST 就可以了 用POST 就可以了
guland 发表于 2010-1-12 10:21 http://www.autoitx.com/images/common/back.gif
我去搜索下!还有点不明白,没了解过这方面知识! 这个验证码识别很简单的
以前有人发过类似贴,刚翻出来,两网站类似
http://www.autoitx.com/forum.php?mod=viewthread&tid=7863&extra=&page=1 本帖最后由 jycel 于 2010-1-13 15:05 编辑
回复 4# bob
我试了下可以读取,但是我换成我这地址读取就空的!不知道是获取图片地址不对?
http://www.autoitx.com/forum.php?mod=viewthread&tid=7863&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
不错,下下来学习 学习。。。。。。。。。。 验证码获取:
#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) 多谢楼上的兄弟提供验证码获取方法:face (26): 看看这个, 看看什么号东西 楼主最后成功了么?
页:
[1]