Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_confirmation_key(self):
timestamp = 1470838334
confirmation_key = guard.generate_confirmation_key(self.identity_secret, Tag.CONF.value, timestamp)
self.assertEquals(confirmation_key, b'pWqjnkcwqni+t/n+5xXaEa0SGeA=')
def _fetch_confirmations_page(self) -> requests.Response:
tag = Tag.CONF.value
params = self._create_confirmation_params(tag)
headers = {'X-Requested-With': 'com.valvesoftware.android.steam.community'}
response = self._session.get(self.CONF_URL + '/conf', params=params, headers=headers)
if 'Steam Guard Mobile Authenticator is providing incorrect Steam Guard codes.' in response.text:
raise InvalidCredentials('Invalid Steam Guard file')
return response