From d821a09b066a250133fc8dc4f178e858bb833117 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Mon, 20 Nov 2023 00:53:37 +0000 Subject: [PATCH] Updated signup --- signup/signup.py | 6 +++--- tmp/password.tmp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 tmp/password.tmp diff --git a/signup/signup.py b/signup/signup.py index 28ae12e..5709951 100644 --- a/signup/signup.py +++ b/signup/signup.py @@ -53,17 +53,17 @@ def create_email_account(username, password): # Create a temporary file to escape the password - with open("tmp/password.tmp", "w") as file: + with open("../tmp/password.tmp", "w") as file: file.write(password) # Pass the file through a shell command - cmd = ["cat", "tmp/password.tmp", "|", "maddy", "creds", "create", f"{username}@hectabit.org"] + cmd = ["cat", "../tmp/password.tmp", "|", "maddy", "creds", "create", f"{username}@hectabit.org"] # Run and determine the result of the shell command result = subprocess.run(" ".join(cmd), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # Delete the temporary file - os.remove("tmp/password.tmp") + os.remove("../tmp/password.tmp") # Check if command executed correctly diff --git a/tmp/password.tmp b/tmp/password.tmp new file mode 100644 index 0000000..30d74d2 --- /dev/null +++ b/tmp/password.tmp @@ -0,0 +1 @@ +test \ No newline at end of file