Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pkcs1
- import math, json, urllib, httplib, random
- params = urllib.urlencode({'username': 'hlsdk5'})
- headers = {"Content-type": "application/x-www-form-urlencoded", \
- "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0"}
- conn = httplib.HTTPSConnection("steamcommunity.com");
- conn.request("POST", "/login/getrsakey/", params, headers);
- response = conn.getresponse();
- publicKeyJSON = json.loads(response.read());
- steamPublicRSAKey = pkcs1.keys.RsaPublicKey(int(publicKeyJSON["publickey_mod"], 16), int(publicKeyJSON["publickey_exp"], 16));
- encryptedPassword = pkcs1.rsaes_pkcs1_v15.encrypt(steamPublicRSAKey, '<MY_PASSWORD WOULD NORMALLY GO HERE>')
- params = urllib.urlencode({ \
- 'password': encryptedPassword, \
- 'username': 'hlsdk5', \
- 'emailauth': None, \
- 'captcha_text': None, \
- 'emailsteamid': None, \
- 'rsatimestamp': publicKeyJSON["timestamp"] \
- })
- headers = {"Content-type": "application/x-www-form-urlencoded"}
- conn = httplib.HTTPSConnection("steamcommunity.com");
- conn.request("POST", "/login/dologin/", params, headers);
- response = conn.getresponse();
- ans = response.getheaders();
Advertisement
Add Comment
Please, Sign In to add comment