· 9 years ago · Sep 02, 2016, 07:40 AM
1#include <Misc.au3>
2
3$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
4$GUI = GUICreate("", 264, 134)
5$pic = GUICtrlCreatePic("", 0, 0, 264, 94)
6$input = GUICtrlCreateInput("", 10, 100, 244, 21)
7$Limit = 10
8
9For $i = 1 to $Limit
10 $oHTTP.Open("GET", "http://mu3k.sytes.net/index.php?page_id=DangKy", False)
11 $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
12 $oHTTP.Send()
13 $cookie = _GetCookie($oHTTP.GetAllResponseHeaders())
14 $oHTTP.Open("GET", "http://mu3k.sytes.net/get.php?aI", False)
15 $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
16 $oHTTP.Send()
17 FileDelete("captcha.jpg")
18 FileWrite("captcha.jpg",$oHTTP.ResponseBody)
19
20 GUICtrlSetImage($pic, "captcha.jpg")
21 GUISetState(@SW_SHOW, $GUI)
22 while 1
23 If _IsPressed("0D") Then
24 $captcha = GUICtrlRead($input)
25 If StringLen($captcha) = 6 Then ExitLoop
26 EndIf
27 Switch GUIGetMsg()
28 Case -3
29 Exit
30 EndSwitch
31 WEnd
32 GUICtrlSetData($input, "")
33 GUISetState(@SW_HIDE, $GUI)
34
35 $oHTTP.Open("POST", "http://mu3k.sytes.net/index.php?page_id=DangKy", False)
36 $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
37 $oHTTP.SetRequestHeader("Cookie", $cookie)
38 $uname = getran(10)
39 $upass = getran(10)
40 $umail = getran(10)
41 $uans = "SpamBot"
42 $data = "userid=" & $uname & "&password=" & $upass & "&confirm_password=" & $upass & "&email_address=" & $umail & "%40gmail.com&country=1&gender=1&question=1&answer=" & $uans & "&verify_int=" & $captcha & "&terms=1&create_account=&x=63&y=16"
43 $oHTTP.Send($data)
44 $Ret = StringRegExp(BinaryToString($oHTTP.ResponseBody, 4), '" align="left">(.*?)</div>', 3)
45 If not IsArray($Ret) Then
46 ConsoleWrite($i & ". ==> FAILED: " & $uname & " || PASS: " & $upass & " || EMAIL: " & $umail & "@gmail.com" & @CRLF & " Unknow error" & @CRLF)
47 Elseif not StringInStr($Ret[1], "Thank") Then
48 ConsoleWrite($i & ". ==> FAILED: " & $uname & " || PASS: " & $upass & " || EMAIL: " & $umail & "@gmail.com" & @CRLF & " " & $Ret[1] & @CRLF)
49 Else
50 ConsoleWrite($i & ". ==> CREATED: " & $uname & " || PASS: " & $upass & " || EMAIL: " & $umail & "@gmail.com" & @CRLF)
51 EndIf
52Next
53Func getran($num)
54 Local $rt
55 for $i = 1 to $num
56 $rt &= (Random(1, 2, 1) = 1 ? Chr((Random(1, 2, 1) = 1 ? Random(65, 90, 1) : Random(97, 122, 1))) : Random(0, 9, 1))
57 Next
58 Return $rt
59EndFunc
60Func _GetCookie($sResponseHeader, $arrBeginGetCookie = 0)
61 Local $aRet = StringRegExp($sResponseHeader, '(?m)^Set\-Cookie\:(.*?)$', 3), $sRet = ''
62 If @error Then Return SetError(1, 0, False)
63 Local $__qRet = UBound($aRet)
64 If $arrBeginGetCookie + $__qRet < 0 Then $arrBeginGetCookie = 0
65 If $arrBeginGetCookie < 0 Then $arrBeginGetCookie = $__qRet + $arrBeginGetCookie
66 For $i = $arrBeginGetCookie To $__qRet - 1
67 $sRet &= $aRet[$i] & ';'
68 Next
69 Return $sRet
70EndFunc