Updated signup
This commit is contained in:
parent
ba6b0b851f
commit
d821a09b06
|
@ -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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
test
|
Loading…
Reference in New Issue