forked from piair/MsRewards-Reborn
Fixed 2FA issue + added better logs
This commit is contained in:
parent
49b691d736
commit
4a5af6455d
2
V6.py
2
V6.py
@ -152,7 +152,7 @@ def play_quiz4(override: int = None):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
log_error(e)
|
log_error(e)
|
||||||
raise ValueError(e)
|
raise ValueError(e)
|
||||||
info("Quiz 8 done.")
|
info("Quiz 4 done.")
|
||||||
custom_sleep(3)
|
custom_sleep(3)
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class DiscordLogger:
|
|||||||
)
|
)
|
||||||
file = File("screenshot.png")
|
file = File("screenshot.png")
|
||||||
embed.set_image(url="attachment://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(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)
|
self.config.discord.wh.send(username="error", file=File("page.html"), avatar_url=self.config.discord.avatar_url)
|
||||||
|
@ -20,3 +20,6 @@ class Driver:
|
|||||||
|
|
||||||
case _:
|
case _:
|
||||||
raise ValueError("The driver must be either pc or mobile")
|
raise ValueError("The driver must be either pc or mobile")
|
||||||
|
|
||||||
|
def current_driver(self):
|
||||||
|
return "PC" if self.pc_driver == self.driver else "Mobile"
|
||||||
|
@ -31,7 +31,7 @@ class UserCredentials:
|
|||||||
def get_tfa(self):
|
def get_tfa(self):
|
||||||
if not self.tfa_enable():
|
if not self.tfa_enable():
|
||||||
warning("Warning: TFA is not enabled. Calling get_tfa is an expected behaviour.")
|
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):
|
def next_account(self):
|
||||||
self.current += 1
|
self.current += 1
|
||||||
|
@ -10,7 +10,7 @@ def get_domain(driver):
|
|||||||
|
|
||||||
def custom_sleep(temps):
|
def custom_sleep(temps):
|
||||||
try:
|
try:
|
||||||
if True: # todo: change this awful condition
|
if False: # todo: change this awful condition
|
||||||
points = ["⢿", "⣻", "⣽", "⣾", "⣷", "⣯", "⣟", "⡿"]
|
points = ["⢿", "⣻", "⣽", "⣾", "⣷", "⣯", "⣟", "⡿"]
|
||||||
passe = 0
|
passe = 0
|
||||||
for _ in range(int(temps)):
|
for _ in range(int(temps)):
|
||||||
|
Loading…
Reference in New Issue
Block a user