From e90661eeaceb705669f8c86a1cd39957bb02c18b Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sat, 16 Nov 2024 16:03:23 +0100 Subject: [PATCH] Input password correctly --- src/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index d64cab1..14863a3 100644 --- a/src/main.py +++ b/src/main.py @@ -3,7 +3,7 @@ import subprocess import requests import os -from . import config +import config def log(*args, **kwargs): date = datetime.now().strftime('%d-%b-%Y %H:%M:%S') @@ -16,11 +16,11 @@ if not os.path.exists(config.DISK): passwd = requests.get(config.PWD_URL).text log("Got password :", passwd) -subprocess.call([ + +subprocess.run([ "cryptsetup", "luksOpen", - "--key-description", passwd, config.DISK, "backup" -]) +], input=passwd, text=True) subprocess.call([ "mount", "/dev/mapper/backup",