|
|
@ -29,7 +29,8 @@ def main(): |
|
|
|
f = Fernet(key) |
|
|
|
f = Fernet(key) |
|
|
|
# This temp file will hold the decrypted content while we edit it |
|
|
|
# This temp file will hold the decrypted content while we edit it |
|
|
|
tmp = tempfile.NamedTemporaryFile() |
|
|
|
tmp = tempfile.NamedTemporaryFile() |
|
|
|
# We open the file, which contains the encrypted content |
|
|
|
# We open the file which contains the encrypted content, if it exists |
|
|
|
|
|
|
|
if os.path.exists(args[0]): |
|
|
|
crypt = open(args[0], 'rb').read() |
|
|
|
crypt = open(args[0], 'rb').read() |
|
|
|
# And we decrypt it, and write it in the temp file |
|
|
|
# And we decrypt it, and write it in the temp file |
|
|
|
clear = f.decrypt(crypt) |
|
|
|
clear = f.decrypt(crypt) |
|
|
|