figenc

[RADIOACTIVE] rsa and symmetric key encryption scripts and executables
git clone git://git.figbert.com/figenc.git
Log | Files | Refs | README

commit 7ef998e656500eda075502ca205a48ab9ead7026
parent 0b6778c8ef517ef81a2b9fc9ccbe4f01480fcbdb
Author: FIGBERT <figbertwelner@gmail.com>
Date:   Sat, 13 Jul 2019 14:21:06 -0700

Fixing bug in decrypt.py caused by formatting changes

Diffstat:
MScripts/decrypt.py | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Scripts/decrypt.py b/Scripts/decrypt.py @@ -50,10 +50,11 @@ def rsa_dec(target_file_raw, save_folder, passkey): symmetric_key = Fernet(symmetric_key_data) #Decrypting and outputting the data for target_file in target_file_list: - with open(target_file, "rb") as open_file: - encrypted_data = open_file.read() - original_message = symmetric_key.decrypt(encrypted_data) - open_file.write(original_message) + with open(target_file, "rb") as read_file: + encrypted_data = read_file.read() + original_message = symmetric_key.decrypt(encrypted_data) + with open(target_file, "wb") as write_file: + write_file.write(original_message) #Outputting the decrypted symmetric key with open(symmetric_key_source, "wb") as symmetric_file: symmetric_file.write(symmetric_key_data) \ No newline at end of file