figenc

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

commit e4b348e1778b5d50db7acffcbfd17f9c02928d10
parent f7146d8f7707c9e9d3df6bb5bc93fef3121c6295
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Fri,  9 Aug 2019 14:49:36 -0700

2.1.9

Diffstat:
MScripts/decrypt.py | 6++++--
MScripts/encrypt.py | 6++++--
MScripts/figENC.py | 13-------------
MScripts/key.py | 6++++--
MScripts/prompts.py | 21+++++++++++++++++++++
MScripts/version.txt | 4++--
6 files changed, 35 insertions(+), 21 deletions(-)

diff --git a/Scripts/decrypt.py b/Scripts/decrypt.py @@ -4,6 +4,7 @@ from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.fernet import Fernet +from prompts import success def rsa_dec(file, priv, passkey): @@ -109,4 +110,5 @@ def dec_manager(files, key_dir, passkey): except: return None with open(sym, "wb") as sym_src: - sym_src.write(sym_dec) -\ No newline at end of file + sym_src.write(sym_dec) + success() +\ No newline at end of file diff --git a/Scripts/encrypt.py b/Scripts/encrypt.py @@ -5,6 +5,7 @@ from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.fernet import Fernet +from prompts import success def RSA(target_file, public_key_source): @@ -94,4 +95,5 @@ def enc_manager(target_files, save_folder): ) ) with open(sym_src, "wb") as crypto_key_file: - crypto_key_file.write(encrypted_key) -\ No newline at end of file + crypto_key_file.write(encrypted_key) + success() +\ No newline at end of file diff --git a/Scripts/figENC.py b/Scripts/figENC.py @@ -213,13 +213,6 @@ class App(): bg="#1A181C", fg="#F2DAFF" ) - self.file_instructions = tk.Label( - self.file_frame, - text="Separate filepaths with colons (:)", - font=("Arial", str(settings["font_size"] - 2)), - bg="#1A181C", - fg="#B494C7" - ) if sys.platform == "darwin": self.file_input = tk.Button( self.file_frame, @@ -567,7 +560,6 @@ class App(): def reset(self): """Hide all elements of the main app GUI and reset the entered text""" self.file_frame.pack_forget() - self.file_instructions.pack_forget() self.file_label.pack_forget() self.file_input.pack_forget() self.passcode_frame.pack_forget() @@ -613,7 +605,6 @@ class App(): self.file_frame.pack(fill="both") self.file_label.config(text="Filepath/s to the file/s to encrypt") self.file_label.pack() - self.file_instructions.pack() self.file_input.pack(fill="x") self.passcode_frame.pack(fill="both") self.passcode_label.config(text="Set private key passcode") @@ -652,7 +643,6 @@ class App(): self.file_frame.pack(fill="both") self.file_label.config(text="Filepath/s to the file/s to encrypt") self.file_label.pack() - self.file_instructions.pack() self.file_input.pack(fill="x") self.save.pack(fill="both") self.save_label.config(text="Save location for keys") @@ -676,7 +666,6 @@ class App(): self.file_frame.pack(fill="both") self.file_label.config(text="Filepath/s to the file/s to encrypt") self.file_label.pack() - self.file_instructions.pack() self.file_input.pack(fill="x") self.save.pack(fill="both") self.save_label.config(text="Key location") @@ -695,7 +684,6 @@ class App(): self.file_frame.pack(fill="both") self.file_label.config(text="Filepath/s to the file/s to decrypt") self.file_label.pack() - self.file_instructions.pack() self.file_input.pack(fill="x") self.passcode_frame.pack(fill="both") self.passcode_label.config(text="Private key passcode") @@ -728,7 +716,6 @@ class App(): self.file_frame.pack(fill="both") self.file_label.config(text="Filepath/s to the file/s to decrypt") self.file_label.pack() - self.file_instructions.pack() self.file_input.pack(fill="x") self.save.pack(fill="both") self.save_label.config(text="Key location") diff --git a/Scripts/key.py b/Scripts/key.py @@ -3,6 +3,7 @@ from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa, padding from cryptography.hazmat.primitives import serialization, hashes from cryptography.fernet import Fernet +from prompts import success def rsa_key(pub, priv, passkey): @@ -94,4 +95,5 @@ def just_key_manager(mode, save_folder, passkey): if rsa: rsa_key(pub_src, priv_src, passkey) else: - mixed_key(pub_src, priv_src, sym_src, passkey) -\ No newline at end of file + mixed_key(pub_src, priv_src, sym_src, passkey) + success() +\ No newline at end of file diff --git a/Scripts/prompts.py b/Scripts/prompts.py @@ -1,4 +1,5 @@ from tkinter import messagebox +from random import choice def overwrite_prompt(): @@ -73,4 +74,24 @@ def missing_keys(folder): " files. Please correct and try again.\n\nDirectory provided:" "\n%s"%folder ) + ) + +def success(): + """Inform the user of the processes succesful completion + with a fun message/reference. + """ + fun_messages = [ + "Proceed into cyberspace with confidence.", + "*applause*", + "Congratulations, prince of darkness.", + "Don't delete the .dat file *wink*", + "You can remove your hoodie now.", + "D*ck pic hidden.", + "Time to take over the world.", + "Mainframe secured.", + "Don't steal my nuts!" + ] + messagebox.showinfo( + "Success", + "The operation was complete. %s"%choice(fun_messages) ) \ No newline at end of file diff --git a/Scripts/version.txt b/Scripts/version.txt @@ -1 +1 @@ -2.0.8 -\ No newline at end of file +2.1.9 +\ No newline at end of file