forked from MarseyWorld/MarseyWorld
login: create invalid file if doesn't exist
parent
03cf8038f3
commit
782a4494da
|
@ -149,7 +149,7 @@ def log_failed_admin_login_attempt(account:User, type:str):
|
|||
ip = get_CF()
|
||||
print(f"Admin user from {ip} failed to login to account {account.user_name} (invalid {type})!")
|
||||
try:
|
||||
with open(f"/admin_failed_logins", "r+", encoding="utf-8") as f:
|
||||
with open(f"/admin_failed_logins", "a+", encoding="utf-8") as f:
|
||||
t = str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time())))
|
||||
f.write(f"{t}, {ip}, {account.username}, {type}\n")
|
||||
except:
|
||||
|
|
Loading…
Reference in New Issue