ddryao 发表于 2012-2-26 23:38:47

请教下YY注册的POST提交地址问题

#include <String.au3>
Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")

$oHTTP.Open("GET", "http://udb.duowan.com/register.do?")
$oHTTP.setRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2")
$oHTTP.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
$oHTTP.setRequestHeader("Accept-Language", "zh-cn,zh;q=0.5")
$oHTTP.setRequestHeader("Connection", "keep-alive")
$oHTTP.setRequestHeader("Cache-Control", "max-age=0")
$oHTTP.send()
$text = $oHTTP.Responsetext
$onec = _StringBetween($text, "type=""hidden"" name=""", """/>")
$poststrone = StringSplit($onec, """ value=""", 1)
$poststrtwo = StringSplit($onec, """ value=""", 1)
$poststring = StringReplace($poststrtwo, "+", "%2B")
$poststring = StringReplace($poststring, "=", "%3D")
$poststring = StringReplace($poststring, "/", "%2F")


$oHTTP.Open("GET", "https://udb.duowan.com/verify/register.do?1330" & Int(Random(111111111, 999999999)))
$oHTTP.setRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2")
$oHTTP.setRequestHeader("Accept", "image/png,image/*;q=0.8,*/*;q=0.5")
$oHTTP.setRequestHeader("Accept-Language", "zh-cn,zh;q=0.5")
$oHTTP.setRequestHeader("Connection", "keep-alive")
$oHTTP.setRequestHeader("Referer", "https://udb.duowan.com/register.do")
$oHTTP.send()
$tex = $oHTTP.GetAllResponseHeaders()
$file = FileOpen(@ScriptDir & "\code.bmp", 2)
FileWrite($file, $oHTTP.responsebody)
FileClose($file)
$code = InputBox("", "")

$oHTTP.Open("POST", "https://udb.duowan.com/registerV2/cae8.do"); 就是这个地cae8
$oHTTP.setRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1")
$oHTTP.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
$oHTTP.setRequestHeader("Accept-Language", "zh-cn,zh;q=0.5")
$oHTTP.setRequestHeader("Connection", "keep-alive")
$oHTTP.setRequestHeader("Referer", "https://udb.duowan.com/register.do")
$oHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Content-Length", "221")
$oHTTP.send("url=&appid=1&" & $poststrone & "=" & $poststrone & "&rcall=" & $poststring & "&username=etdfe666rhr&password=aaafdff&securityCode1=" & $code)
$text = $oHTTP.Responsetext
MsgBox(64, "", $text)

今天做个YY注册机练手,但是发现注册时的提交地址,每次都会变化,https://udb.duowan.com/registerV2/cae8.do   这个cae8每次都不一样,看了许久也不清楚它是从哪里能获取得到它,真是晕死了。所以发上来请高手们来看一看啊。

ppsfxn 发表于 2012-2-27 10:14:14

跳过帮顶,关注
页: [1]
查看完整版本: 请教下YY注册的POST提交地址问题