Updated signup

This commit is contained in:
Tracker-Friendly 2023-11-20 00:53:37 +00:00
parent ba6b0b851f
commit d821a09b06
2 changed files with 4 additions and 3 deletions

View File

@ -53,17 +53,17 @@ def create_email_account(username, password):
# Create a temporary file to escape the 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) file.write(password)
# Pass the file through a shell command # 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 # Run and determine the result of the shell command
result = subprocess.run(" ".join(cmd), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) result = subprocess.run(" ".join(cmd), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Delete the temporary file # Delete the temporary file
os.remove("tmp/password.tmp") os.remove("../tmp/password.tmp")
# Check if command executed correctly # Check if command executed correctly

1
tmp/password.tmp Normal file
View File

@ -0,0 +1 @@
test