Skip to content

Commit

Permalink
Fix for issue mentioned in #65
Browse files Browse the repository at this point in the history
Signed-off-by: LuXeZs <[email protected]>
  • Loading branch information
LuXeZs committed Jun 20, 2023
1 parent 437b88c commit 7e17166
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ def codeEntry(
statistics['attemptedCodeCount'] += 1
time.sleep(0.3) # Wait for page to update so we can detect changes such as rate limited.

if ('The resource is being rate limited.' in driver.page_source):
while ('The resource is being rate limited.' in driver.page_source):
sleepDuration = secrets.choice(range(7, 12))
statistics['ratelimitCount'] += 1
print(f"Code: {color(totpCode, 'blue')} was {color('Ratelimited', 'yellow')} will retry in {color(sleepDuration, 'blue')}")
time.sleep(sleepDuration)
loginFields['TOTP'].send_keys(Keys.RETURN)
sleepDuration = secrets.choice(range(6, 10))
time.sleep(0.3)

if ('Token has expired' in driver.page_source):
#Print this out as well as some statistics, and prompt the user to retry.
Expand Down

0 comments on commit 7e17166

Please sign in to comment.