Updated account
This commit is contained in:
parent
d8b5eff1d9
commit
dd5b4149c2
|
@ -27,9 +27,7 @@ def is_valid_input(input_string):
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
def change_email_password(username, password):
|
def change_email_password(username, password):
|
||||||
print(username)
|
if password and username:
|
||||||
print(password)
|
|
||||||
if password and is_valid_input(username):
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
# Create a temporary file to escape the password
|
# Create a temporary file to escape the password
|
||||||
|
@ -38,7 +36,7 @@ def change_email_password(username, password):
|
||||||
file.write(password)
|
file.write(password)
|
||||||
|
|
||||||
# Pass the file through a shell command
|
# Pass the file through a shell command
|
||||||
cmd = ["cat", "../tmp/chnpassword.tmp", "|", "maddy", "creds", "password", f"{username}@hectabit.org"]
|
cmd = ["cat", "../tmp/chnpassword.tmp", "|", "maddy", "creds", "password", username]
|
||||||
|
|
||||||
# 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)
|
||||||
|
|
Loading…
Reference in New Issue