def _send_login(self, captcha='', email_code='', twofactor_code=''): data = { 'username': self.username, "password": b64encode(pkcs1v15_encrypt(self.key, self.password.encode('ascii'))), "emailauth": email_code, "emailsteamid": str(self.steam_id) if email_code else '', "twofactorcode": twofactor_code, "captchagid": self.captcha_gid, "captcha_text": captcha, "loginfriendlyname": "python-steam webauth", "rsatimestamp": self.timestamp, "remember_login": '******', "donotcache": int(time() * 100000), } try: return self.session.post( 'https://steamcommunity.com/login/dologin/', data=data, timeout=15).json() except requests.exceptions.RequestException as e: raise HTTPError(str(e))
def _send_login(self, password='', captcha='', email_code='', twofactor_code=''): data = { 'username': self.username, "password": b64encode(pkcs1v15_encrypt(self.key, password.encode('ascii'))), "emailauth": email_code, "emailsteamid": str(self.steam_id) if email_code else '', "twofactorcode": twofactor_code, "captchagid": self.captcha_gid, "captcha_text": captcha, "loginfriendlyname": "python-steam webauth", "rsatimestamp": self.timestamp, "remember_login": '******', "donotcache": int(time() * 100000), "oauth_client_id": "DE45CD61", "oauth_scope": "read_profile write_profile read_client write_client", } self.session.cookies.set('mobileClientVersion', '0 (2.1.3)') self.session.cookies.set('mobileClient', 'android') try: return self.session.post('https://steamcommunity.com/login/dologin/', data=data, timeout=15).json() except requests.exceptions.RequestException as e: raise HTTPError(str(e)) finally: self.session.cookies.pop('mobileClientVersion', None) self.session.cookies.pop('mobileClient', None)
def _send_login(self, captcha='', email_code='', twofactor_code=''): data = { 'username' : self.username, "password": b64encode(pkcs1v15_encrypt(self.key, self.password.encode('ascii'))), "emailauth": email_code, "emailsteamid": str(self.steam_id) if email_code else '', "twofactorcode": twofactor_code, "captchagid": self.captcha_gid, "captcha_text": captcha, "loginfriendlyname": "python-steam webauth", "rsatimestamp": self.timestamp, "remember_login": '******', "donotcache": int(time() * 100000), "oauth_client_id": "DE45CD61", "oauth_scope": "read_profile write_profile read_client write_client", } self.session.cookies.set('mobileClientVersion', '0 (2.1.3)') self.session.cookies.set('mobileClient', 'android') try: return self.session.post('https://steamcommunity.com/login/dologin/', data=data, timeout=15).json() except requests.exceptions.RequestException as e: raise HTTPError(str(e)) finally: self.session.cookies.pop('mobileClientVersion', None) self.session.cookies.pop('mobileClient', None)
def cli_login_in(self, password): self.webclient = WebAuth() rsa = WebAuth.get_rsa(self.username) key = rsa_publickey(int(rsa['publickey_mod'], 16), int(rsa['publickey_exp'], 16)) self.webclient.login_raw( self.username, b64encode(pkcs1v15_encrypt(key, password.encode('ascii'))), rsa['timestamp'])
def _send_login(self, captcha='', email_code='', twofactor_code=''): data = { 'username': self.username, "password": b64encode(pkcs1v15_encrypt(self.key, self.password.encode('ascii'))), "emailauth": email_code, "emailsteamid": str(self.steam_id) if email_code else '', "twofactorcode": twofactor_code, "captchagid": self.captcha_gid, "captcha_text": captcha, "loginfriendlyname": "python-steam webauth", "rsatimestamp": self.timestamp, "remember_login": '******', "donotcache": int(time() * 100000), } try: return self.session.post('https://steamcommunity.com/login/dologin/', data=data, timeout=15).json() except requests.exceptions.RequestException as e: raise HTTPError(str(e))