figenc

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

commit 33f1d0816804152f87c8089ae8d16661aabef11e
parent 9e680976a3221ab024260e2b15a5f47f2de62a25
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Thu, 22 Aug 2019 16:05:26 -0700

2.3.3

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/tcl/init.tcl | 2+-
MExecutables/figENC_MacOS/figENC.app/Contents/Resources/version.txt | 4++--
MScripts/check.py | 20+++++++++++++++++++-
MScripts/figENC.py | 3+++
MScripts/prompts.py | 9+++++++++
MScripts/version.txt | 4++--
MScripts/version_check.py | 2++
10 files changed, 38 insertions(+), 6 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/tcl/init.tcl b/Executables/figENC_MacOS/figENC.app/Contents/Resources/tcl/init.tcl @@ -16,7 +16,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.5.9 +package require -exact Tcl 8.6.8 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/Executables/figENC_MacOS/figENC.app/Contents/Resources/version.txt b/Executables/figENC_MacOS/figENC.app/Contents/Resources/version.txt @@ -1 +1 @@ -2.3.1 -\ No newline at end of file +2.3.3 +\ No newline at end of file diff --git a/Scripts/check.py b/Scripts/check.py @@ -1,3 +1,5 @@ +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import serialization import os, inspect, sys import prompts @@ -214,7 +216,21 @@ def dec(files, pass1, pass2, key_dir): priv = key_dir + "/private_key.pem" sym = key_dir + "/symmetric_key.key" proper_keys = True if (rsa and os.path.exists(priv)) or (not rsa and os.path.exists(priv) and os.path.exists(sym)) else False - if broken_paths == "" and key_dir_access and password_match and proper_keys: + correct_pass = True + with open(priv, "rb") as priv_src: + try: + serialization.load_pem_private_key( + priv_src.read(), + password=bytes(pass1, "utf-8"), + backend=default_backend() + ) + except ValueError: + correct_pass = False + if ( + broken_paths == "" and key_dir_access + and password_match and proper_keys + and correct_pass + ): return True else: if broken_paths != "": @@ -225,6 +241,8 @@ def dec(files, pass1, pass2, key_dir): prompts.password_error(pass1, pass2) if not proper_keys: prompts.missing_keys(key_dir) + if not correct_pass: + prompts.wrong_pass(pass1) return False diff --git a/Scripts/figENC.py b/Scripts/figENC.py @@ -451,6 +451,9 @@ class App(): elif self.update_bool == "updated": self.update_text = "Up to date!" self.update_color = "#B1A5B8" + elif self.update_bool == "dev": + self.update_text = "Hello FIGBERT" + self.update_color = "#643181" else: self.update_text = "Connection failed" self.update_color = "#FC142F" diff --git a/Scripts/prompts.py b/Scripts/prompts.py @@ -76,6 +76,15 @@ def missing_keys(folder): ) ) +def wrong_pass(passkey): + messagebox.showwarning( + "Incorrect Password", + ( + "The password provided is incorrect. Please try again." + "\n\nPassword:\n%s" % passkey + ) + ) + def success(mode): """Inform the user of the processes succesful completion with a fun message/reference. diff --git a/Scripts/version.txt b/Scripts/version.txt @@ -1 +1 @@ -2.3.1 -\ No newline at end of file +2.3.3 +\ No newline at end of file diff --git a/Scripts/version_check.py b/Scripts/version_check.py @@ -28,5 +28,7 @@ def update_available(): local_version = local.read() if local_version < git_import: return "available" + elif local_version > git_import: + return "dev" else: return "updated" \ No newline at end of file