Compare commits

...

2 Commits

Author SHA1 Message Date
piair
36fd92f71c fix json start 2024-02-28 14:44:11 +01:00
piair
0a02eb2033 fix json start 2024-02-28 14:44:01 +01:00
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,3 @@
import json
from pyotp import TOTP from pyotp import TOTP
from modules.Tools.logger import debug, warning from modules.Tools.logger import debug, warning
@ -12,7 +10,8 @@ class UserCredentials:
self.total = 0 self.total = 0
def add(self, username: str, password: str, tfa: str = None): 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] = { self.data[self.total] = {
"username": username, "username": username,
"password": password, "password": password,
@ -36,7 +35,10 @@ class UserCredentials:
def next_account(self): def next_account(self):
self.current += 1 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): def is_valid(self):
return self.current < self.total return self.current < self.total

View File

@ -1 +1 @@
v6.8.36 v6.8.37