Fixed 2FA issue + added better logs

This commit is contained in:
piair 2024-03-01 17:29:15 +01:00
parent 49b691d736
commit 4a5af6455d
6 changed files with 8 additions and 5 deletions

2
V6.py
View File

@ -152,7 +152,7 @@ def play_quiz4(override: int = None):
except Exception as e:
log_error(e)
raise ValueError(e)
info("Quiz 8 done.")
info("Quiz 4 done.")
custom_sleep(3)

View File

@ -30,7 +30,7 @@ class DiscordLogger:
)
file = File("screenshot.png")
embed.set_image(url="attachment://screenshot.png")
embed.set_footer(text=self.config.UserCredentials.get_mail())
embed.set_footer(text=self.config.UserCredentials.get_mail() + " - " + self.config.WebDriver.current_driver())
self.config.discord.wh.send(embed=embed, username="error", file=file, avatar_url=self.config.discord.avatar_url)
self.config.discord.wh.send(username="error", file=File("page.html"), avatar_url=self.config.discord.avatar_url)

View File

@ -20,3 +20,6 @@ class Driver:
case _:
raise ValueError("The driver must be either pc or mobile")
def current_driver(self):
return "PC" if self.pc_driver == self.driver else "Mobile"

View File

@ -31,7 +31,7 @@ class UserCredentials:
def get_tfa(self):
if not self.tfa_enable():
warning("Warning: TFA is not enabled. Calling get_tfa is an expected behaviour.")
return TOTP(self.data[self.current]["tfa"])
return TOTP(self.data[self.current]["2fa"])
def next_account(self):
self.current += 1

View File

@ -10,7 +10,7 @@ def get_domain(driver):
def custom_sleep(temps):
try:
if True: # todo: change this awful condition
if False: # todo: change this awful condition
points = ["", "", "", "", "", "", "", ""]
passe = 0
for _ in range(int(temps)):

View File

@ -1 +1 @@
v6.8.40
v6.8.41