水煮丫迷你QQ怎样解决获取验证码的问题
水煮丫迷你QQ怎样解决获取验证码的问题?在论坛里看到了有多新手也说这个问题,但是在更改了最新获取验证码的网址后,运行脚本时还是无法正常显示验证码?附上他老人家的源码,那是发了30块下载来的!;**** 参数创建于 ACNWrapper_GUI ****
#Region
#AutoIt3Wrapper_Icon=MiniQQ48.ico
#AutoIt3Wrapper_Outfile=MiniQQ.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=水煮丫迷你QQv1.0
#AutoIt3Wrapper_Res_Description=水煮丫软件设计室
#AutoIt3Wrapper_Res_Fileversion=1.0.0.2
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=独孤の伊狼
#AutoIt3Wrapper_Au3Check_Stop_OnWarning=y
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#EndRegion
;**** 参数创建于 ACNWrapper_GUI ****
;#NoTrayIcon
HotKeySet("{F3}", "SetShow") ;显示
HotKeySet("{ESC}", "ExitExe");退出
;全局变量
$Hide = "0"
$mouseON = False
$Showflag = True
$Url = "http://w.qq.com/main.shtml"
$urlIE = ObjCreate("shell.explorer.2")
$isLogon = False
;图标操作 ;
Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 1)
Opt("CaretCoordMode", 1)
;引入函数udf
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <ACN_NET.au3>
#include <Constants.au3>
#include <IE.au3>
#include <QQ_gatpostkey.au3>
#include <ButtonConstants.au3>
#include <QQ_md5.au3>
;界面
#Region ### START Koda GUI section ### Form=
;主界面
$FormQQ = GUICreate("水煮丫迷你QQ", 235, 550, -1, -1, -1, -1)
GUISetIcon("MiniQQ48.ico")
GUISetFont(11, 400, 0, "MS Sans Serif")
$tabMiniQQ = GUICtrlCreateTab(5, 8, 226, 495)
GUICtrlSetFont(-1, 10, 400, 0, "黑体")
$TabMain = GUICtrlCreateTabItem("登录QQ")
GUICtrlSetFont(-1, 10, 400, 0, "黑体")
$Label1 = GUICtrlCreateLabel("QQ号码:", 32, 58, 47, 17)
$Label2 = GUICtrlCreateLabel("QQ密码:", 32, 78, 47, 17)
$Label3 = GUICtrlCreateLabel("验证码:", 32, 102, 51, 17)
$Input1 = GUICtrlCreateInput("", 84, 52, 121, 21)
GUICtrlSetLimit($Input1, 12, 5);限制输入QQ号码为5-12位
$Input2 = GUICtrlCreateInput("", 84, 76, 121, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
$Input3 = GUICtrlCreateInput("", 84, 100, 45, 21)
GUICtrlSetLimit($Input3, 4)
$Label4 = GUICtrlCreateLabel("点击图片可更换验证码", 34, 129, 168, 17)
$Pic1 = GUICtrlCreatePic("", 32, 150, 130, 53, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS));验证码图片
$btnLogin = GUICtrlCreateButton("登陆", 32, 216, 75, 25)
GUICtrlSetFont(-1, 10, 400, 0, "黑体")
$btnExit = GUICtrlCreateButton("退 出", 129, 215, 75, 25)
GUICtrlSetFont(-1, 10, 400, 0, "黑体")
$tabNotebook = GUICtrlCreateTabItem("迷你QQ")
$objPanelM = GUICtrlCreateObj($urlIE, 8, 32, 219, 465)
GUICtrlSetFont(-1, 9, 400, 0, "黑体")
GUICtrlSetCursor(-1, 5)
$tabTools = GUICtrlCreateTabItem("常用功能")
$myeidt = GUICtrlCreateEdit("" & @CRLF, 8, 32, 219, 465, $ES_AUTOVSCROLL + $WS_VSCROLL)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
;自动隐藏窗体
$XY = ControlGetPos($FormQQ, "", $tabMiniQQ)
$X0 = $XY
$Y0 = $XY
;改变窗体大小事件,已取消此功能
TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "SetShow")
AdlibRegister("_Resize_and_Other", 50)
;右击快捷菜单
$setitem = TrayCreateMenu("设置")
$linkitem = TrayCreateItem("开机启动", $setitem, -1, 1)
TrayItemSetOnEvent($linkitem, "OpenPcStart")
$hideQQitem = TrayCreateItem("隐藏QQ", $setitem, -1, 1)
TrayItemSetOnEvent($hideQQitem, "SetShow")
$showQQitem = TrayCreateItem("显示QQ", $setitem, -1, 1)
TrayItemSetOnEvent($showQQitem, "SetShow")
TrayCreateItem("")
$aboutitem = TrayCreateItem("关于")
TrayItemSetOnEvent($aboutitem, "AuoutShuizhuya")
TrayCreateItem("")
$exititem = TrayCreateItem("退出")
TrayItemSetOnEvent($exititem, "ExitExe")
#EndRegion ### END Koda GUI section ###
_get_key()
TraySetState()
TrayTip("快捷键", "F3隐藏,ESC退出", 1, 1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_MINIMIZE
GUISetState(@SW_MINIMIZE)
Case $btnLogin
_Check()
Case $Pic1
_get_key()
Case $btnExit
ExitExe()
EndSwitch
_EmptyScriptMem()
WEnd
_EmptyScriptMem()
Func _Check();检查输入内容
GUICtrlSetState($btnLogin, $GUI_DISABLE)
GUICtrlSetData($btnLogin, "登陆中...")
$qq = GUICtrlRead($Input1)
$yzm = StringUpper(GUICtrlRead($Input3))
If $yzm = "" Then
MsgBox(0, "提示", " " & @CRLF & " 请输入验证码")
GUICtrlSetState($btnLogin, $GUI_ENABLE)
GUICtrlSetData($btnLogin, "登陆")
ElseIf $qq = "" Then
MsgBox(0, "提示", " " & @CRLF & " 请输入QQ号码")
GUICtrlSetState($btnLogin, $GUI_ENABLE)
GUICtrlSetData($btnLogin, "登陆")
ElseIf Not GUICtrlRead($Input2) Then
MsgBox(0, "提示", " " & @CRLF & " 请输入QQ密码")
GUICtrlSetState($btnLogin, $GUI_ENABLE)
GUICtrlSetData($btnLogin, "登陆")
Else
$jm = qq_md5("md5_3", GUICtrlRead($Input2))
$pass = qq_md5("md5", $jm & $yzm)
TestNetLink($qq, $pass, $yzm)
EndIf
EndFunc ;==>_Check
Func _get_key();获取验证码
$img = InetGet("http://ptlogin2.qq.com/getimage", "key.gif", 1)
GUICtrlSetImage($Pic1,"key.gif")
EndFunc ;==>_get_key
;设置显示或隐藏MINIQQ
Func SetShow()
If $Showflag = False Then
GUISetState(@SW_SHOW, $FormQQ)
$Showflag = True
Else
GUISetState(@SW_HIDE, $FormQQ)
$Showflag = False
EndIf
EndFunc ;==>SetShow
;测试网络连接成功
Func TestNetLink($qq, $pass, $yzm)
$Netflag = _NetworkGetInternetIP()
If $Netflag <> "0.0.0.0" Then
$isLogon = True
LogonMiniQQ($qq, $pass, $yzm)
GUICtrlSetState($tabNotebook, $GUI_SHOW);切换到标签
;获取外网IP地址
TrayTip("系统提示", "本次登录IP:" & _NetworkGetInternetIP(), 1, 1)
Else
TrayTip("水煮丫提示您:", "您的网络存在故障,请检查网络设置!", 1, 2)
EndIf
EndFunc ;==>TestNetLink
;退出
Func ExitExe()
Exit 0
EndFunc ;==>ExitExe
;登录迷你QQ
Func LogonMiniQQ($qq, $pass, $yzm)
If $isLogon = True Then
_post($qq, $pass, $yzm)
$urlIE.Navigate($Url)
Else
$urlIE.Navigate("about:blank")
EndIf
EndFunc ;==>LogonMiniQQ
Func _post($qq, $pass, $yzm);提交POST登陆QQ
$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.Open("post", "http://ptlogin2.qq.com/login", False)
$oHTTP.setRequestHeader("Cache-Control", "no-cache")
$oHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Content-Length", "213")
;miniQQ
$oHTTP.Send("u=" & $qq & "&p=" & $pass & "&verifycode=" & $yzm & "&aid=15000101&u1=http%3A%2F%2Fw.qq.com%2Fmain.shtml&fp=loginerroralert&h=1&ptredirect=1&ptlang=0&from_ui=1&pttype=1&dumy=")
;QQ空间
;$oHTTP.Send("u="&$qq&"&p="&$pass&"&verifycode="&$yzm&"&aid=15000101&u1=http%3A%2F%2Fimgcache.qq.com%2Fqzone%2Fv5%2Floginsucc.html%3Fpara%3Dizone&fp=loginerroralert&h=1&ptredirect=1&ptlang=0&from_ui=1&dumy=")
$a = $oHTTP.responseText
Sleep(100)
If StringInStr($a, "QQ社区登录") Then
;GUISetState(@SW_SHOW,$Form2)
;GUISetState(@SW_HIDE,$Form1)
Else
$230 = StringLen($a)
$231 = StringInStr($a, '");') - 1
$232 = StringTrimRight($a, $230 - $231)
MsgBox(0, "", StringMid($232, StringInStr($a, 'alert("') + 7))
GUICtrlSetState($btnLogin, $GUI_ENABLE)
GUICtrlSetData($btnLogin, "登陆")
EndIf
EndFunc ;==>_post
;开机启动
Func OpenPcStart()
$isOpenStart = RegRead("HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\Run", "水煮丫迷你QQ")
If $isOpenStart = "" Then
RegWrite("HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN", "水煮丫迷你QQ", "REG_SZ", @AutoItExe)
EndIf
EndFunc ;==>OpenPcStart
;关于水煮丫
Func AuoutShuizhuya()
TrayTip("水煮丫感谢您:", "如果您发现本软件存在问题或者您对本软件有什么好的意见或者建议请联系作者!", 1, 1)
_IECreate("http://hi.baidu.com/10801009/blog")
EndFunc ;==>AuoutShuizhuya
;对脚本内存进行释放
Func _EmptyScriptMem()
;~ 无论您是使用或者转载,请保留原作者(kn007)信息,谢谢!
Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, _
'int', False, 'int', @AutoItPID)
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle)
DllCall("kernel32.dll", 'int', 'CloseHandle', 'int', $ai_Handle)
EndFunc ;==>_EmptyScriptMem
;改变窗体大小以及隐藏
Func _Resize_and_Other()
_MouseOutGui_and_WriteFile()
Local $Xmax = @DesktopWidth
Local $XY = ControlGetPos($FormQQ, "", $tabMiniQQ)
Local $Wxy = WinGetPos($FormQQ)
Local $K = $Wxy / 500
Local $Iy = 500
Local $Ix = Int($Wxy / $K)
Local $Xn
If $XY <> $X0 Or $XY <> $Y0 Then
$X0 = $XY
$Y0 = $XY
ControlMove($FormQQ, "", $tabMiniQQ, 0, 0, $X0, $Y0)
EndIf
If $Wxy <= 20 And $Hide = "0" And $mouseON = False Then
For $i = 1 To $Ix
If $Wxy < 0 Then
$Xn = $Wxy - Int($Wxy / $Ix * $i)
Else
$Xn = 0 - Int($Wxy / $Ix * $i)
EndIf
WinMove($FormQQ, "", $Xn, $Wxy)
If $Xn <= -$Wxy Then ExitLoop
Next
$Hide = "LEFT"
WinSetOnTop($FormQQ, "", 1)
EndIf
If $Xmax - ($Wxy + $Wxy) <= 20 And $Hide = "0" And $mouseON = False Then
For $i = 1 To $Ix
If $Xmax - ($Wxy + $Wxy) <= 0 Then
$Xn = $Wxy + Int($Wxy / $Ix * $i)
Else
$Xn = $Xmax - $Wxy + Int($Wxy / $Ix * $i)
EndIf
WinMove($FormQQ, "", $Xn, $Wxy)
If $Xn >= $Xmax + 1 Then ExitLoop
Next
$Hide = "RIGHT"
WinSetOnTop($FormQQ, "", 1)
EndIf
If $Wxy <= 20 And $Hide = "0" And $mouseON = False Then
For $i = 1 To $Iy
If $Wxy > 0 Then
$Xn = 0 - Int($Wxy / $Iy * $i)
Else
$Xn = $Wxy - Int($Wxy / $Iy * $i)
EndIf
WinMove($FormQQ, "", $Wxy, $Xn)
If $Xn + $Wxy <= 0 Then ExitLoop
Next
$Hide = "UP"
WinSetOnTop($FormQQ, "", 1)
EndIf
Local $MouseXY = MouseGetPos()
If $MouseXY < $Wxy + $Wxy And $MouseXY > $Wxy And $MouseXY = 0 And $Hide = "LEFT" Then
For $i = 1 To $Ix
Local $Xn = Int($Wxy / $Ix * $i) - $Wxy
WinMove($FormQQ, "", $Xn, $Wxy)
Next
$Hide = "0"
WinSetOnTop($FormQQ, "", 0)
EndIf
If $MouseXY < $Wxy + $Wxy And $MouseXY > $Wxy And $MouseXY = $Xmax - 1 And $Hide = "RIGHT" Then
For $i = 1 To $Ix
Local $Xn = $Xmax - Int($Wxy / $Ix * $i)
WinMove($FormQQ, "", $Xn, $Wxy)
Next
$Hide = "0"
WinSetOnTop($FormQQ, "", 0)
EndIf
If $MouseXY < $Wxy + $Wxy And $MouseXY > $Wxy And $MouseXY = 0 And $Hide = "UP" Then
For $i = 1 To $Iy
Local $Xn = -$Wxy + Int($Wxy / $Iy * $i)
WinMove($FormQQ, "", $Wxy, $Xn)
Next
$Hide = "0"
WinSetOnTop($FormQQ, "", 0)
EndIf
EndFunc ;==>_Resize_and_Other
;窗体移动
Func _MouseOutGui_and_WriteFile()
Local $Wxy = WinGetPos($FormQQ)
Local $MouseXY = MouseGetPos()
If $MouseXY <= $Wxy + $Wxy And $MouseXY >= $Wxy And $MouseXY <= $Wxy + $Wxy And $MouseXY >= $Wxy Then
$mouseON = True
Else
$mouseON = False
EndIf
EndFunc ;==>_MouseOutGui_and_WriteFile
如果这里更改了最新地址,为什么还是一样不可以正常获取验证码?
Func _get_key();获取验证码
$img = InetGet("http://ptlogin2.qq.com/getimage", "./key.gif", 1)
GUICtrlSetImage($Pic1,"./key.gif")
EndFunc ;==>_get_key 为了回答你问题,特意去下了水煮的源码,因为你贴的代码里很多包含文件俺没有~
下次问问题注意把东西都发上来~
显示验证码:
把下面这行:$Pic1 = GUICtrlCreatePic("", 32, 150, 130, 53, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS));验证码图片去掉样式,改为:$Pic1 = GUICtrlCreatePic("", 32, 150, 130, 53 ) ;验证码图片就可以了,猜测是某些样式不兼容。
PS: 即便是能显示验证码了,也没法登录的~QQ升级了的说~ QQ_gatpostkey.au3,QQ_md5.au3呢? 回复 2# ajian55
谢谢! 难阿,这个也行 回复 2# ajian55 这里怎样更改为他那个LOGO 回复 6# gzxwh2010
托盘图标吧? 编译成exe的时候可以选择自己的图标的。
PS: 这软件难道在你那里依然可以用?话说我这里用不了了的说,腾讯搞地域歧视/系统歧视/...~~~ 回复 7# ajian55 呵呵,你说笑了,我这里也是一样登陆不了的,只是想看看效果,学习学习,也想改成现在可以用的版本!不过还望指教,我试过了,不知哪里改那个图标,还望指点! 这个是好东西 呵呵 这个是好东西 呵呵 这个是好东西 呵呵
页:
[1]