找回密码
 加入
搜索
查看: 4816|回复: 4

[AU3基础] 新手post申请QQ号

[复制链接]
发表于 2013-5-26 22:30:07 | 显示全部楼层 |阅读模式
本帖最后由 manbutianya 于 2013-5-26 22:32 编辑

参照多个源码,搞下POST申请QQ号码,但还是搞不出来,那个达人帮忙修改下。
#include<IE.au3>
#include <GUIConstantsEx.au3>
$nickName = 'ilovenicegirl2' ;你的昵称
$password = '3f565fe62362b51758fb8021d8bebc31b6d911cd1879d61f2040b01bc48ad818b23c726c7dc86f7d58dad29f07453eb748bdec121827b7fe9399078c35b99631e419075eb123b5459437646dedba7c91f8c8cbe9f7725db3245fd27594be163ac0bffbe89dd06c5cc677c329d66542df679fdfdb8cb74ca97fb287a1d8763b50'
$yazhengurl = "http://captcha.qq.com/getimage?aid=1007901&r="
$nickchaurl = "http://zc.qq.com/cgi-bin/chs/common/dirty_check?nick=" & $nickName & "®Type=1&r=0.6351481574129476"    ; 昵称是否可用
$nicktijurl = "http://zc.qq.com//cgi-bin/chs/numreg/get_acc?r=0.3802129264251957"    ; 提交注册
Global $Pic = @ScriptDir & '\checkcode.jpg'

$Form1_1 = GUICreate("QQ注册", 180, 160, -1, -1)
$Pic1 = GUICtrlCreatePic("", 8, 8, 164, 76)
$Label1 = GUICtrlCreateLabel("验证码:", 18, 90, 52, 17)
$Input1 = GUICtrlCreateInput("", 18, 110, 80, 40)
$Button1 = GUICtrlCreateButton("确定", 100, 110, 30,30)
GUISetState(@SW_SHOW)


getp($nickchaurl)
Sleep(1000)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;获取验证码图;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$oHTTP = ObjCreate("MSXML2.XMLHTTP")
        $oHTTP.Open("get", $yazhengurl, False)
        ;$oIE=_IECreate("http://captcha.qq.com/getimage?aid=1007901&r=")
        $oHTTP.setRequestHeader("Accept", "*/*")
        $oHTTP.setRequestHeader("Connection", "Keep-Alive")
        $oHTTP.setRequestHeader("Cache-Control", " no-cache")
        $oHTTP.setRequestHeader("Accept-Language", "zh-cn")
        $oHTTP.Send();post关键数据
        $Content = BinaryToString($oHTTP.responseBody,1)
        Global $Cookies = $oHTTP.getResponseHeader('Set-Cookie')
        $Body = $oHTTP.responseBody
        FileDelete($Pic)
        $Open = FileOpen($Pic, 10)
        FileWrite($Pic, Binary($Body))
        FileClose($Open)
        GUICtrlSetImage($Pic1, $Pic)
        
        While 1
        $msg = GUIGetMsg()
        Switch $msg
                Case  $GUI_EVENT_CLOSE
                ExitLoop
                Case $Button1
                        $Code = GUICtrlRead($Input1)
                           ExitLoop
    EndSwitch
WEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;获取验证码图;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

toup($nicktijurl)





Func getp($url)
        $oHTTP = ObjCreate("MSXML2.XMLHTTP")
        $oHTTP.Open("get", $url, False)
        ;$oIE=_IECreate("http://captcha.qq.com/getimage?aid=1007901&r=")
        $oHTTP.setRequestHeader("Accept", "*/*")
        $oHTTP.setRequestHeader("Connection", "Keep-Alive")
        $oHTTP.setRequestHeader("Cache-Control", " no-cache")
        $oHTTP.setRequestHeader("Accept-Language", "zh-cn")
        $oHTTP.Send();post关键数据
        $Content = BinaryToString($oHTTP.responseBody,1)
        Global $Cookies = $oHTTP.getResponseHeader('Set-Cookie')
        $Body = $oHTTP.responseBody
        FileDelete($Pic)
        $Open = FileOpen($Pic, 10)
        FileWrite($Pic, Binary($Body))
        FileClose($Open)
        GUICtrlSetImage($Pic1, $Pic)
        ;MsgBox(0,"",$Content)
        
EndFunc   ;==>getp
Func toup($url)
        $oHTTP = ObjCreate("MSXML2.XMLHTTP")
        $oHTTP.Open("POST", $url, False)
        ;$oHTTP.setRequestHeader("Accept", "*/*")
        ;$oHTTP.setRequestHeader("Connection", "Keep-Alive")
        ;$oHTTP.setRequestHeader("Cache-Control", " no-cache")
        ;$oHTTP.setRequestHeader("Accept-Language", "zh-cn")
        ;$oHTTP.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; @_9b]g{KN|8dMX`=]OXhpXrYaAdTpDOhST8_,n; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)")
        $needsend = "&verifycode=" & $Code & "&qzone_flag=1&country=1&province=35&city=5&isnongli=0&year=1991&month=5&day=3&isrunyue=0&password=15eab6f0360023a2dbfbd8fb85baa69cec61bcb1d17480c6498593dad837492f5f8a4ab91e99778556a17f85de5cb83f6c5a8b0b7e6d3a974c353a11692eee237e55ceb9708d05462424e4b9596023a8308c31cdda9bdf70dd00c60550f42c8ff30873fc12de0dd9425683a8dc4cb6b5be79ea0b5272aa81ff0f88e1fb87b0dd&nick=" & $nickName & "alu888&email=false&other_email=false&elevel=1&sex=2&qzdate=&jumpfrom=58030&csloginstatus=1&t5a7m=w1i6w4"
        $oHTTP.Send($needsend);post关键数据
        MsgBox(0,"",$oHTTP.responseBody)
        ;$Content = BinaryToString($oHTTP.responseBody,1)
        ;MsgBox(0,"",$Content)
EndFunc   ;==>toup
 楼主| 发表于 2013-5-26 22:30:32 | 显示全部楼层
本帖最后由 manbutianya 于 2013-5-26 22:34 编辑

难啊难,谁叫我刚开始就学AU3,不学易语言!
 楼主| 发表于 2013-5-28 21:37:15 | 显示全部楼层
为什么每次要手机验证,那位能人帮忙改下
#include<IE.au3>
#include <GUIConstantsEx.au3>
$nickName = 'ilovenicegifr28' ;你的昵称
$password = '3f565fe62362b51758fb8021d8bebc31b6d911cd1879d61f2040b01bc48ad818b23c726c7dc86f7d58dad29f07453eb748bdec121827b7fe9399078c35b99631e419075eb123b5459437646dedba7c91f8c8cbe9f7725db3245fd27594be163ac0bffbe89dd06c5cc677c329d66542df679fdfdb8cb74ca97fb287a1d8763b50'
$zcwangz  = 'http://zc.qq.com'
$yazhengurl = 'http://captcha.qq.com/getimage?aid=1007901&r='
$nickchaurl = 'http://zc.qq.com/cgi-bin/chs/common/dirty_check?nick='&$nickName&'®Type=1&r=0.6351481574129476'    ; 昵称是否可用
$nicktijurl = 'http://zc.qq.com/cgi-bin/chs/numreg/get_acc?r='    ; 提交注册
Global $Pic = @ScriptDir & '\checkcode.jpg'
Local $Content = ""
$Form1_1 = GUICreate("QQ注册", 180, 160, -1, -1)
$Pic1 = GUICtrlCreatePic("", 8, 8, 164, 76)
$Label1 = GUICtrlCreateLabel("验证码:", 18, 90, 52, 17)
$Input1 = GUICtrlCreateInput("", 18, 110, 80, 40)
$Button1 = GUICtrlCreateButton("确定", 100, 110, 30,30)
GUISetState(@SW_SHOW)

getp($zcwangz)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;获取验证码图;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$oHTTP = ObjCreate("MSXML2.XMLHTTP")
        $oHTTP.Open("get", $yazhengurl, False)
        ;$oIE=_IECreate("http://captcha.qq.com/getimage?aid=1007901&r=")
        $oHTTP.setRequestHeader("Accept", "*/*")
        $oHTTP.setRequestHeader("Connection", "Keep-Alive")
        $oHTTP.setRequestHeader("Cache-Control", " no-cache")
        $oHTTP.setRequestHeader("Accept-Language", "zh-cn")
        $oHTTP.Send();post关键数据
        $Content = BinaryToString($oHTTP.responseBody,1)
        Global $Cookies = $oHTTP.getResponseHeader('Set-Cookie')
        $Body = $oHTTP.responseBody
        FileDelete($Pic)
        $Open = FileOpen($Pic, 10)
        FileWrite($Pic, Binary($Body))
        FileClose($Open)
        GUICtrlSetImage($Pic1, $Pic)
        
        While 1
        $msg = GUIGetMsg()
        Switch $msg
                Case  $GUI_EVENT_CLOSE
                ExitLoop
                Case $Button1
                        $Code = GUICtrlRead($Input1)
                           ExitLoop
    EndSwitch
WEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;获取验证码图;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
getp($nickchaurl)
MsgBox(0,"",$Content)
Sleep(5000)
toup($nicktijurl)

Func getp($url)
        $oHTTP = ObjCreate("MSXML2.XMLHTTP")
        $oHTTP.Open("get", $url, False)
        ;$oIE=_IECreate("http://captcha.qq.com/getimage?aid=1007901&r=")
        $oHTTP.setRequestHeader("Accept", "*/*")
        $oHTTP.setRequestHeader("Connection", "Keep-Alive")
        $oHTTP.setRequestHeader("Cache-Control", " no-cache")
        $oHTTP.setRequestHeader("Accept-Language", "zh-cn")
        $oHTTP.Send();post关键数据
        Local $Content = BinaryToString($oHTTP.responseBody,1)
        
EndFunc   ;==>getp
Func toup($url)
        $oHTTP = ObjCreate("MSXML2.XMLHTTP")
        $oHTTP.Open("POST", $url, False)
        $oHTTP.setRequestHeader("Accept", "*/*")
        $oHTTP.setRequestHeader("Connection", "Keep-Alive")
        $oHTTP.setRequestHeader("Cache-Control", " no-cache")
        $oHTTP.setRequestHeader("Accept-Language", "zh-cn")
        $oHTTP.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; @_9b]g{KN|8dMX`=]OXhpXrYaAdTpDOhST8_,n; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)")
        $needsend = "&verifycode=" & $Code & "&qzone_flag=1&country=1&province=35&city=5&isnongli=0&year=1991&month=5&day=3&isrunyue=0&password=15eab6f0360023a2dbfbd8fb85baa69cec61bcb1d17480c6498593dad837492f5f8a4ab91e99778556a17f85de5cb83f6c5a8b0b7e6d3a974c353a11692eee237e55ceb9708d05462424e4b9596023a8308c31cdda9bdf70dd00c60550f42c8ff30873fc12de0dd9425683a8dc4cb6b5be79ea0b5272aa81ff0f88e1fb87b0dd&nick=" & $nickName & "alu888&email=false&other_email=false&elevel=1&sex=2&qzdate=&jumpfrom=58030&csloginstatus=1&t5a7m=w1i6w4"
        $oHTTP.Send('&verifycode='&$Code&'&qzone_flag=1&country=1&province=35&city=5&isnongli=0&year=1991&month=5&day=3&isrunyue=0&password=15eab6f0360023a2dbfbd8fb85baa69cec61bcb1d17480c6498593dad837492f5f8a4ab91e99778556a17f85de5cb83f6c5a8b0b7e6d3a974c353a11692eee237e55ceb9708d05462424e4b9596023a8308c31cdda9bdf70dd00c60550f42c8ff30873fc12de0dd9425683a8dc4cb6b5be79ea0b5272aa81ff0f88e1fb87b0dd&nick='&$nickName&'alu888&email=false&other_email=false&elevel=1&sex=2&qzdate=&jumpfrom=58030&csloginstatus=1&t5a7m=w1i6w4');post关键数据
        MsgBox(0,"",$oHTTP.responseBody)
        Local $Content = BinaryToString($oHTTP.responseBody,1)
        MsgBox(0,"",$Content)
EndFunc   ;==>toup
发表于 2013-5-29 10:56:00 | 显示全部楼层
纯菜鸟,虽然不懂,还是支持一下
发表于 2013-5-29 17:05:48 | 显示全部楼层
论坛有易语言的教程连接
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-16 08:26 , Processed in 0.076138 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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