Don't like ads? PRO users don't see any ads ;-)

MineCraft Account Check

By: ShadowzKnowledge on Sep 21st, 2011  |  syntax: AutoIt  |  size: 1.34 KB  |  hits: 706  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;MineCraft has updated the login page .. script wont work anymore :/
  2. ;------------------------------
  3. ;Coded by ShadowzKnowledge
  4. ;visit my YouTube Channel:
  5. ;http://www.youtube.com/user/ShadowzKnowledge
  6. ;------------------------------
  7.  
  8. #include <IE.au3>
  9.  
  10. $user = InputBox("", "Pls enter username")
  11. If @error Or $user = "" Then Exit
  12. $pw = InputBox("", "Pls enter the password")
  13. If @error Or $pw = "" Then Exit
  14.  
  15. ToolTip("User: " & $user & @CRLF & "PW: " & $pw, 0, 0, "Checking account ...")
  16. $ret = MineCraft($user, $pw)
  17. If $ret = "acc_valid" Then
  18.         MsgBox(0, "", "User and password match!")
  19. ElseIf $ret = "acc_unvalid" Then
  20.         MsgBox(0, "", "Don't match")
  21. Else
  22.         MsgBox(16, "", "An error occurred")
  23. EndIf
  24.  
  25. Func MineCraft($user, $pw)
  26.         $url = "http://www.minecraft.net/login.jsp"
  27.         $oIE = _IECreate($url, 0, 0)
  28.         $oForm = _IEGetObjByName($oIE, "input")
  29.         $oInput = _IEFormElementGetObjByName($oForm, "username")
  30.         _IEFormElementSetValue($oInput, $user)
  31.  
  32.         $oPW = _IEFormElementGetObjByName($oForm, "password")
  33.         _IEFormElementSetValue($oPW, $pw)
  34.  
  35.         _IEFormSubmit($oForm, 0)
  36.         _IELoadWait($oIE)
  37.  
  38.         $txt = _IEBodyReadText($oIE)
  39.  
  40.         $ans = StringRegExp($txt, "Failed to log in. Wrong username and/or password.")
  41.         If $ans = 1 Then
  42.                 $status = "acc_unvalid"
  43.         Else
  44.                 $status = "acc_valid"
  45.         EndIf
  46.         _IEQuit($oIE)
  47.         Return $status
  48. EndFunc   ;==>MineCraft