From 4a5af6455d9c50d98051db32425c877e0275b4ac Mon Sep 17 00:00:00 2001 From: piair Date: Fri, 1 Mar 2024 17:29:15 +0100 Subject: [PATCH] Fixed 2FA issue + added better logs --- V6.py | 2 +- modules/Classes/DiscordLogger.py | 2 +- modules/Classes/Driver.py | 3 +++ modules/Classes/UserCredentials.py | 2 +- modules/Tools/tools.py | 2 +- version | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/V6.py b/V6.py index d2e5209..9ebb038 100755 --- a/V6.py +++ b/V6.py @@ -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) diff --git a/modules/Classes/DiscordLogger.py b/modules/Classes/DiscordLogger.py index 73bdc8b..40c4a2b 100644 --- a/modules/Classes/DiscordLogger.py +++ b/modules/Classes/DiscordLogger.py @@ -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) diff --git a/modules/Classes/Driver.py b/modules/Classes/Driver.py index 25edfba..2e349f7 100644 --- a/modules/Classes/Driver.py +++ b/modules/Classes/Driver.py @@ -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" diff --git a/modules/Classes/UserCredentials.py b/modules/Classes/UserCredentials.py index 6e9ba59..cbc9fcc 100644 --- a/modules/Classes/UserCredentials.py +++ b/modules/Classes/UserCredentials.py @@ -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 diff --git a/modules/Tools/tools.py b/modules/Tools/tools.py index a7f8108..49743e4 100644 --- a/modules/Tools/tools.py +++ b/modules/Tools/tools.py @@ -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)): diff --git a/version b/version index 9ec889a..ce359d0 100644 --- a/version +++ b/version @@ -1 +1 @@ -v6.8.40 +v6.8.41