fix json start
This commit is contained in:
parent
6122d9ee13
commit
0a02eb2033
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue