diff --git a/modules/Classes/UserCredentials.py b/modules/Classes/UserCredentials.py index 820a780..6e9ba59 100644 --- a/modules/Classes/UserCredentials.py +++ b/modules/Classes/UserCredentials.py @@ -1,5 +1,3 @@ -import json - from pyotp import TOTP from modules.Tools.logger import debug, warning @@ -12,7 +10,8 @@ class UserCredentials: self.total = 0 def add(self, username: str, password: str, tfa: str = None): - debug(f"adding account with data : Username: {username}, Password: {password}, 2FA: {'None' if tfa == '' else tfa}") + debug( + f"adding account with data : Username: {username}, Password: {password}, 2FA: {'None' if tfa == '' else tfa}") self.data[self.total] = { "username": username, "password": password, @@ -36,7 +35,10 @@ class UserCredentials: def next_account(self): self.current += 1 - debug(f"New credentials: {self.data[self.current]}") + if self.is_valid(): + debug(f"New credentials: {self.data[self.current]}") + else: + debug("No new credentials.") def is_valid(self): return self.current < self.total