From 46b6abde3fc03303bf83fd4805d3bbeb7d95ef3f Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 13 Mar 2021 00:14:22 +0100 Subject: [PATCH] fuse-client: password from file --- bin/copyparty-fuse.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/copyparty-fuse.py b/bin/copyparty-fuse.py index 9967881f..08871b13 100755 --- a/bin/copyparty-fuse.py +++ b/bin/copyparty-fuse.py @@ -1008,6 +1008,12 @@ def main(): log = null_log dbg = null_log + if ar.a and ar.a.startswith("$"): + fn = ar.a[1:] + log("reading password from file [{}]".format(fn)) + with open(fn, "rb") as f: + ar.a = f.read().decode("utf-8").strip() + if WINDOWS: os.system("rem")