Advertisement
Guest User

Untitled

a guest
Mar 25th, 2018
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. import json
  2. import time
  3. import base64
  4. import sys
  5. import os
  6. from Crypto.Cipher import PKCS1_v1_5
  7. from Crypto.PublicKey import RSA
  8. import requests
  9. from fake_useragent import UserAgent
  10.  
  11. requests_sent = 0
  12.  
  13. ua = UserAgent()
  14. user_agent = str(ua.random)
  15. print(f"User agent generated: {user_agent}")
  16.  
  17. account1_name = input("Username: ")
  18. account1_password = input("Password: ")
  19. headers = { 'User-Agent' : user_agent }
  20. rsa_key = 'https://steamcommunity.com/login/getrsakey/'
  21. values = {'username' : account1_name, 'donotcache' : str(int(time.time()*1000))}
  22. post = requests.post(rsa_key, data=values, headers=headers)
  23. json_data = json.loads(post.text)
  24. mod = int(str(json_data["publickey_mod"]), 16)
  25. exp = int(str(json_data["publickey_exp"]), 16)
  26. rsa = RSA.construct((mod, exp))
  27. cipher = PKCS1_v1_5.new(rsa)
  28. payload_login1 = {
  29. 'username' : account1_name,
  30. "password": base64.b64encode(cipher.encrypt(account1_password)),
  31. "rsatimestamp": json_data["timestamp"],
  32. "remember_login": False,
  33. "donotcache": str(int(time.time()*1000)),
  34. }
  35. session = requests.session() #Creates persistent HTTP session on account 1
  36. login_url = 'https://steamcommunity.com/login/dologin/'
  37. post2 = session.post(login_url, data=payload_login1, headers=headers)
  38. json_data2 = json.loads(post2.text)
  39. if json_data2["success"]:
  40. print(f"Logged into {account1_name} successfully.")
  41. else:
  42. print("Error! Could not login:", json_data2["message"])
  43. sys.exit()
  44. edit_url = 'http://steamcommunity.com/id/kawaii/edit'
  45. get_url = session.get(edit_url, allow_redirects=False)
  46. sessionid = get_url.cookies.get_dict()
  47. sessionid = str(sessionid)[15:-2]
  48. print(f"Session ID: {sessionid}\n")
  49. new_url = session.post(edit_url, allow_redirects=True)
  50. new_url = new_url.url
  51. id_turbo = input("ID to turbo: ")
  52. print(f"Turboing {id_turbo}")
  53.  
  54. while True:
  55. requests_sent += 1
  56. print(requests_sent, end='\r')
  57. check_id = requests.get(f"http://steamcommunity.com/id/{id_turbo}/ajaxaliases")
  58. if "The specified profile could not be found." in check_id.text:
  59. session.post("%s/?sessionID=%s&type=profileSave&customURL=%s" % (new_url, sessionid, id_turbo))
  60. check_if_grabbed = session.get(new_url)
  61. if id_turbo in check_if_grabbed.text:
  62. print(f"Grabbed {id_turbo}")
  63. sys.exit()
  64. else:
  65. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement