Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import time
- import base64
- import sys
- import os
- from Crypto.Cipher import PKCS1_v1_5
- from Crypto.PublicKey import RSA
- import requests
- from fake_useragent import UserAgent
- requests_sent = 0
- ua = UserAgent()
- user_agent = str(ua.random)
- print(f"User agent generated: {user_agent}")
- account1_name = input("Username: ")
- account1_password = input("Password: ")
- headers = { 'User-Agent' : user_agent }
- rsa_key = 'https://steamcommunity.com/login/getrsakey/'
- values = {'username' : account1_name, 'donotcache' : str(int(time.time()*1000))}
- post = requests.post(rsa_key, data=values, headers=headers)
- json_data = json.loads(post.text)
- mod = int(str(json_data["publickey_mod"]), 16)
- exp = int(str(json_data["publickey_exp"]), 16)
- rsa = RSA.construct((mod, exp))
- cipher = PKCS1_v1_5.new(rsa)
- payload_login1 = {
- 'username' : account1_name,
- "password": base64.b64encode(cipher.encrypt(account1_password)),
- "rsatimestamp": json_data["timestamp"],
- "remember_login": False,
- "donotcache": str(int(time.time()*1000)),
- }
- session = requests.session() #Creates persistent HTTP session on account 1
- login_url = 'https://steamcommunity.com/login/dologin/'
- post2 = session.post(login_url, data=payload_login1, headers=headers)
- json_data2 = json.loads(post2.text)
- if json_data2["success"]:
- print(f"Logged into {account1_name} successfully.")
- else:
- print("Error! Could not login:", json_data2["message"])
- sys.exit()
- edit_url = 'http://steamcommunity.com/id/kawaii/edit'
- get_url = session.get(edit_url, allow_redirects=False)
- sessionid = get_url.cookies.get_dict()
- sessionid = str(sessionid)[15:-2]
- print(f"Session ID: {sessionid}\n")
- new_url = session.post(edit_url, allow_redirects=True)
- new_url = new_url.url
- id_turbo = input("ID to turbo: ")
- print(f"Turboing {id_turbo}")
- while True:
- requests_sent += 1
- print(requests_sent, end='\r')
- check_id = requests.get(f"http://steamcommunity.com/id/{id_turbo}/ajaxaliases")
- if "The specified profile could not be found." in check_id.text:
- session.post("%s/?sessionID=%s&type=profileSave&customURL=%s" % (new_url, sessionid, id_turbo))
- check_if_grabbed = session.get(new_url)
- if id_turbo in check_if_grabbed.text:
- print(f"Grabbed {id_turbo}")
- sys.exit()
- else:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement