figenc

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

commit f60fd28e1be084399d5e72d83e65d4b3e013c158
parent 9261b8a811054e3d96f3bb10785a0541ab30ef49
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Sat,  3 Aug 2019 22:25:05 -0700

1.7.0

Diffstat:
MExecutables/figENC.dmg | 0
MExecutables/figENC_MacOS/figENC.app/Contents/MacOS/base_library.zip | 0
MExecutables/figENC_MacOS/figENC.app/Contents/MacOS/figENC | 0
MExecutables/figENC_MacOS/figENC.app/Contents/Resources/settings.json | 1-
MExecutables/figENC_MacOS/figENC.app/Contents/Resources/tips.json | 6++----
MExecutables/figENC_MacOS/figENC.app/Contents/Resources/version.txt | 4++--
MScripts/check.py | 54+++++++++++++++++++++++++++---------------------------
MScripts/figENC.py | 76++--------------------------------------------------------------------------
MScripts/settings.json | 1-
MScripts/tips.json | 6++----
DScripts/update.py | 27---------------------------
MScripts/version.txt | 4++--
MScripts/version_check.py | 3++-
13 files changed, 39 insertions(+), 143 deletions(-)

diff --git a/Executables/figENC.dmg b/Executables/figENC.dmg Binary files differ. diff --git a/Executables/figENC_MacOS/figENC.app/Contents/MacOS/base_library.zip b/Executables/figENC_MacOS/figENC.app/Contents/MacOS/base_library.zip Binary files differ. diff --git a/Executables/figENC_MacOS/figENC.app/Contents/MacOS/figENC b/Executables/figENC_MacOS/figENC.app/Contents/MacOS/figENC Binary files differ. diff --git a/Executables/figENC_MacOS/figENC.app/Contents/Resources/settings.json b/Executables/figENC_MacOS/figENC.app/Contents/Resources/settings.json @@ -1,7 +1,6 @@ { "auto_update": false, "font_size": 16, - "scroll": false, "win_height": 700, "win_width": 700 } \ No newline at end of file diff --git a/Executables/figENC_MacOS/figENC.app/Contents/Resources/tips.json b/Executables/figENC_MacOS/figENC.app/Contents/Resources/tips.json @@ -1,13 +1,11 @@ [ - "if the app widgets don't fit on the screen, adjust the font size\nor turn on the scrollbar in the settings page.", - "the app keeps itself updated automatically, so you don't have to think about it.", + "if the app widgets don't fit on the screen, adjust the font size in the settings page.", + "to check for app updates, take a look at the settings page on app startup.", "for added security, store the keys on a seperate drive from your computer\n(i.e. flash drive, cloud storage).", "if you give someone access to your keys, they can decrypt your files.\nKeep your keys private!", "figENC supports image encryption as well as text file encryption.\nHide your private pics!", "password encryption on your keys enhances the encryption algorithm,\nfurther securing your files.", - "keys generated by figENC are PEM-compatible, and should\nwork with other encryption programs.", "figENC uses a unique encryption algorithm to provide\nRSA encryption to files of any size.", - "figENC uses multilayer encryption. To encrypt or decrypt, you need\nat least two of the three keys.", "figENC's RSA encryption is military grade, and has never been broken\nby hackers or governments.", "fonts in figENC are relative – there's one font size in settings,\nand other sizes are determined based on that selection", "right click on the password entry fields to toggle text visibility. Peekaboo!" diff --git a/Executables/figENC_MacOS/figENC.app/Contents/Resources/version.txt b/Executables/figENC_MacOS/figENC.app/Contents/Resources/version.txt @@ -1 +1 @@ -1.0.3 -\ No newline at end of file +1.7.0 +\ No newline at end of file diff --git a/Scripts/check.py b/Scripts/check.py @@ -180,36 +180,36 @@ def password_check(first_pass, second_pass): return False -# def find_path(filename): -# """Return the filepath from the filename when running from a -# pyinstaller onefile application. +def find_path(filename): + """Return the filepath from the filename when running from a + pyinstaller onefile application. -# Keyword arguments: -# filename -- the filename to convert to a filepath -# """ -# if hasattr(sys, '_MEIPASS'): -# # PyInstaller >= 1.6 -# os.chdir(sys._MEIPASS) -# filename = os.path.join(sys._MEIPASS, filename) -# elif '_MEIPASS2' in os.environ: -# # PyInstaller < 1.6 (tested on 1.5 only) -# os.chdir(os.environ['_MEIPASS2']) -# filename = os.path.join(os.environ['_MEIPASS2'], filename) -# else: -# os.chdir(os.path.dirname(sys.argv[0])) -# filename = os.path.join(os.path.dirname(sys.argv[0]), filename) -# return filename + Keyword arguments: + filename -- the filename to convert to a filepath + """ + if hasattr(sys, '_MEIPASS'): + # PyInstaller >= 1.6 + os.chdir(sys._MEIPASS) + filename = os.path.join(sys._MEIPASS, filename) + elif '_MEIPASS2' in os.environ: + # PyInstaller < 1.6 (tested on 1.5 only) + os.chdir(os.environ['_MEIPASS2']) + filename = os.path.join(os.environ['_MEIPASS2'], filename) + else: + os.chdir(os.path.dirname(sys.argv[0])) + filename = os.path.join(os.path.dirname(sys.argv[0]), filename) + return filename -def find_path(file): - """Return the correct filename if you are running it as a script""" - return os.path.dirname( - os.path.abspath( - inspect.getfile( - inspect.currentframe() - ) - ) - ) + "/{}".format(file) +# def find_path(file): +# """Return the correct filename if you are running it as a script""" +# return os.path.dirname( +# os.path.abspath( +# inspect.getfile( +# inspect.currentframe() +# ) +# ) +# ) + "/{}".format(file) def quick_check(mode, target_file_raw=None, save_folder=None): diff --git a/Scripts/figENC.py b/Scripts/figENC.py @@ -9,7 +9,6 @@ from decrypt import rsa_dec import version_check import check from check import find_path -import update as up class App(): @@ -34,13 +33,6 @@ class App(): height=settings["win_height"], width=settings["win_width"] ) - if settings["scroll"]: - self.vertical_scroll = tk.Scrollbar( - root, - command=self.canvas.yview - ) - self.canvas.config(yscrollcommand=self.vertical_scroll.set) - self.vertical_scroll.pack(side=tk.RIGHT, fill=tk.Y) self.canvas.pack(fill="both", expand=True, side=tk.LEFT) self.frame = tk.Frame(self.canvas, bg="#1A181C") self.frame.place(relwidth=1, relheight=1) @@ -338,7 +330,6 @@ class App(): root.deiconify() self.launcher.destroy() self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) def open_settings(self, root): """Open the settings window and temporarily minimize the root window @@ -367,10 +358,10 @@ class App(): self.frame, text="Settings", justify=tk.CENTER, - font=("Arial", str(self.settings["font_size"] + 2)), + font=("Arial", str(self.settings["font_size"] + 4)), bg="#643181", fg="#F2DAFF", - pady=2 + pady=6 ) self.header.pack(fill=tk.X) self.font_frame = tk.Frame(self.frame, bg="#1A181C") @@ -396,29 +387,6 @@ class App(): ) self.font_menu.config(bg="#1A181C", fg="#643181") self.font_menu.pack(side=tk.LEFT) - self.scroll_frame = tk.Frame(self.frame, bg="#1A181C") - self.scroll_frame.pack(side=tk.TOP, fill=tk.BOTH, pady=10) - self.scroll_label = tk.Label( - self.scroll_frame, - text="Scrollbar: ", - justify=tk.LEFT, - font=("Arial", str(self.settings["font_size"])), - bg="#1A181C", - fg="#F2DAFF", - pady=2 - ) - self.scroll_label.pack(side=tk.LEFT) - self.scroll_options = ["Off", "On"] - self.scroll_dropdown = tk.StringVar() - self.scroll_dropdown.set("On" if self.settings["scroll"] else "Off") - self.scroll_menu = tk.OptionMenu( - self.scroll_frame, - self.scroll_dropdown, - *self.scroll_options, - command=self.modify_scroll - ) - self.scroll_menu.config(bg="#1A181C", fg="#643181") - self.scroll_menu.pack(side=tk.LEFT) self.width_frame = tk.Frame(self.frame, bg="#1A181C") self.width_frame.pack(side=tk.TOP, fill=tk.BOTH, pady=10) self.width_label = tk.Label( @@ -465,29 +433,6 @@ class App(): ) self.height_menu.config(bg="#1A181C", fg="#643181") self.height_menu.pack(side=tk.LEFT) - self.auto_frame = tk.Frame(self.frame, bg="#1A181C") - self.auto_frame.pack(side=tk.TOP, fill=tk.BOTH, pady=10) - self.auto_label = tk.Label( - self.auto_frame, - text="Automatic Updates: ", - justify=tk.LEFT, - font=("Arial", str(self.settings["font_size"])), - bg="#1A181C", - fg="#F2DAFF", - pady=2 - ) - self.auto_label.pack(side=tk.LEFT) - self.auto_options = ["Off", "On"] - self.auto_dropdown = tk.StringVar() - self.auto_dropdown.set("On" if self.settings["auto_update"] else "Off") - self.auto_menu = tk.OptionMenu( - self.auto_frame, - self.auto_dropdown, - *self.auto_options, - command=self.modify_auto - ) - self.auto_menu.config(bg="#1A181C", fg="#643181") - self.auto_menu.pack(side=tk.LEFT) self.update_frame = tk.Frame(self.frame, bg="#1A181C") self.update_frame.pack(side=tk.TOP, fill=tk.BOTH, pady=10) self.update_label = tk.Label( @@ -631,7 +576,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "key_enc" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) elif mode == 1: #Encrypt with fresh keys (no password) self.reset() self.file_frame.pack(fill="both") @@ -656,7 +600,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "weak_key_enc" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) elif mode == 2: #Encrypt with generated keys self.reset() self.file_frame.pack(fill="both") @@ -676,7 +619,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "enc" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) elif mode == 3: #Decrypt with generated keys (password locked) self.reset() self.file_frame.pack(fill="both") @@ -710,7 +652,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "dec" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) elif mode == 4: #Decrypt with generated keys (no password) self.reset() self.file_frame.pack(fill="both") @@ -730,7 +671,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "weak_dec" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) elif mode == 5: #Only create fresh keys (password locked) self.reset() self.passcode_frame.pack(fill="both") @@ -764,7 +704,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "just_key" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) elif mode == 6: #Only create fresh keys (no password) self.reset() self.save.pack(fill="both") @@ -784,7 +723,6 @@ class App(): self.submit.pack(pady="10") self.crypto_mode = "weak_key" self.frame.update() - self.canvas.config(scrollregion=self.canvas.bbox("all")) def go( self, @@ -854,15 +792,6 @@ class App(): self.settings["font_size"] = value self.frame.update() - def modify_scroll(self, value): - """Change the value of the scroll key in the self.settings variable - - Keyword arguments: - value -- a string, "on" or "off", to be converted to a boolean - """ - bool_val = True if value is "On" else False - self.settings["scroll"] = bool_val - self.frame.update() def modify_auto(self, value): """Change the value of the auto_update key in the self.settings @@ -910,7 +839,6 @@ class App(): if __name__ == "__main__": - up.check_for_updates() root = tk.Tk() App(root) root.mainloop() \ No newline at end of file diff --git a/Scripts/settings.json b/Scripts/settings.json @@ -1,7 +1,6 @@ { "auto_update": false, "font_size": 16, - "scroll": false, "win_height": 700, "win_width": 700 } \ No newline at end of file diff --git a/Scripts/tips.json b/Scripts/tips.json @@ -1,13 +1,11 @@ [ - "if the app widgets don't fit on the screen, adjust the font size\nor turn on the scrollbar in the settings page.", - "the app keeps itself updated automatically, so you don't have to think about it.", + "if the app widgets don't fit on the screen, adjust the font size in the settings page.", + "to check for app updates, take a look at the settings page on app startup.", "for added security, store the keys on a seperate drive from your computer\n(i.e. flash drive, cloud storage).", "if you give someone access to your keys, they can decrypt your files.\nKeep your keys private!", "figENC supports image encryption as well as text file encryption.\nHide your private pics!", "password encryption on your keys enhances the encryption algorithm,\nfurther securing your files.", - "keys generated by figENC are PEM-compatible, and should\nwork with other encryption programs.", "figENC uses a unique encryption algorithm to provide\nRSA encryption to files of any size.", - "figENC uses multilayer encryption. To encrypt or decrypt, you need\nat least two of the three keys.", "figENC's RSA encryption is military grade, and has never been broken\nby hackers or governments.", "fonts in figENC are relative – there's one font size in settings,\nand other sizes are determined based on that selection", "right click on the password entry fields to toggle text visibility. Peekaboo!" diff --git a/Scripts/update.py b/Scripts/update.py @@ -1,26 +0,0 @@ -import os -import sys -import requests -import subprocess -import zipfile -from check import find_path - -SCRIPTDIR = os.path.dirname(os.path.abspath(__file__)) -RETRY_LIMIT = 2 - - -def download_update(): - if sys.platform is "win32": - download_url = "https://github.com/therealFIGBERT/figENC/blob/master/Executables/figENC.exe?raw=true" - #something - else: - download_url = "https://github.com/therealFIGBERT/figENC/trunk/Executables/figENC.app/Contents" - output_dir = "/".join(SCRIPTDIR.split("/")[:-1]) - subprocess.run(["svn", "checkout", download_url, output_dir], shell=False) - -def check_for_updates(): - with open(find_path("version.txt")) as read_version: - local_version = read_version.read() - git_version = requests.get("https://raw.githubusercontent.com/therealFIGBERT/figENC/master/Scripts/version.txt").text - if git_version > local_version: - download_update() -\ No newline at end of file diff --git a/Scripts/version.txt b/Scripts/version.txt @@ -1 +1 @@ -1.6.8 -\ No newline at end of file +1.7.0 +\ No newline at end of file diff --git a/Scripts/version_check.py b/Scripts/version_check.py @@ -7,7 +7,8 @@ def update_available(): try: git_import = requests.get( ("https://raw.githubusercontent.com/therealFIGBERT/figENC/" - "master/Executables/figENC.app/Contents/Resources/version.txt" + "master/Executables/figENC_MacOS/figENC.app/Contents/Resources" + "/version.txt" ) ).text except requests.exceptions.ConnectionError: