Compare commits
No commits in common. "36fd92f71c7b6313316a68ab2572f95eae067909" and "6122d9ee1333bbc2d16effda653d2cfd7d6b8ccc" have entirely different histories.
36fd92f71c
...
6122d9ee13
@ -1,3 +1,5 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
from pyotp import TOTP
|
from pyotp import TOTP
|
||||||
|
|
||||||
from modules.Tools.logger import debug, warning
|
from modules.Tools.logger import debug, warning
|
||||||
@ -10,8 +12,7 @@ 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(
|
debug(f"adding account with data : Username: {username}, Password: {password}, 2FA: {'None' if tfa == '' else tfa}")
|
||||||
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,
|
||||||
@ -35,10 +36,7 @@ class UserCredentials:
|
|||||||
|
|
||||||
def next_account(self):
|
def next_account(self):
|
||||||
self.current += 1
|
self.current += 1
|
||||||
if self.is_valid():
|
debug(f"New credentials: {self.data[self.current]}")
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user