figenc

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

commit 8e768f0dbcd54c2494dbace0a192c2e3f981f779
parent 97fb75f6db0490c424555c2549a98b86e443211c
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Mon, 14 Oct 2019 14:46:36 -0700

2.3.6

Diffstat:
MExecutables/figENC.dmg | 0
MExecutables/figENC_MacOS/figENC.app/Contents/MacOS/base_library.zip | 0
AExecutables/figENC_MacOS/figENC.app/Contents/MacOS/cookie.json | 2++
MExecutables/figENC_MacOS/figENC.app/Contents/MacOS/figENC | 0
AExecutables/figENC_MacOS/figENC.app/Contents/Resources/cookie.json | 27+++++++++++++++++++++++++++
MExecutables/figENC_MacOS/figENC.app/Contents/Resources/version.txt | 4++--
MScripts/check.py | 34+---------------------------------
AScripts/cookie.json | 27+++++++++++++++++++++++++++
MScripts/figENC.py | 2+-
AScripts/path.py | 30++++++++++++++++++++++++++++++
MScripts/prompts.py | 33++++-----------------------------
MScripts/version.txt | 4++--
MScripts/version_check.py | 6+++---
13 files changed, 99 insertions(+), 70 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/cookie.json b/Executables/figENC_MacOS/figENC.app/Contents/MacOS/cookie.json @@ -0,0 +1 @@ +../Resources/cookie.json +\ No newline at end of file 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/cookie.json b/Executables/figENC_MacOS/figENC.app/Contents/Resources/cookie.json @@ -0,0 +1,26 @@ +{ + "enc": [ + "Proceed into cyberspace with confidence.", + "*applause*", + "Congratulations, prince of darkness.", + "Don't delete the .dat file", + "You can remove your hoodie now.", + "D*ck pic hidden.", + "Time to take over the world.", + "Mainframe secured.", + "Don't steal my nuts!", + "Probably a little overkill" + ], + "dec": [ + "Proceed into cyberspace with confidence.", + "*applause*", + "Congratulations, prince of darkness.", + "Don't delete the .dat file", + "You can remove your hoodie now.", + "From nothing to something.", + "Time to take over the world.", + "Mainframe secured.", + "Don't steal my nuts!", + "Like pulling a rabbit from a hat, but with lots of math, computers, and it's actually nothing like pulling a rabbit from a hat." + ] +} +\ No newline at end of file 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.5 -\ No newline at end of file +2.3.6 +\ No newline at end of file diff --git a/Scripts/check.py b/Scripts/check.py @@ -1,7 +1,6 @@ from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization -import os, inspect, sys -import prompts +import os, prompts def password_check(first_pass, second_pass): """Returns `True` is the two passed strings match, @@ -16,37 +15,6 @@ def password_check(first_pass, second_pass): else: return False - -# def find_path(filename): -# """Return the correct filepath if you are running -# figENC as a bundled application - -# Keyword arguments: -# filename -- the filename to convert to a filepath -# """ -# try: -# base_path = sys._MEIPASS -# except Exception: -# base_path = os.path.abspath(".") -# return os.path.join(base_path, filename) - - -def find_path(file): - """Return the correct filepath if you are running - figENC as a script - - Keyword arguments: - file -- the filename to convert to a filepath - """ - return os.path.dirname( - os.path.abspath( - inspect.getfile( - inspect.currentframe() - ) - ) - ) + "/{}".format(file) - - def key_enc(files, pass1, pass2, key_dir): """Return `True` if all of the conditions are valid for fresh-key passworded encryption. Otherwise, return diff --git a/Scripts/cookie.json b/Scripts/cookie.json @@ -0,0 +1,26 @@ +{ + "enc": [ + "Proceed into cyberspace with confidence.", + "*applause*", + "Congratulations, prince of darkness.", + "Don't delete the .dat file", + "You can remove your hoodie now.", + "D*ck pic hidden.", + "Time to take over the world.", + "Mainframe secured.", + "Don't steal my nuts!", + "Probably a little overkill" + ], + "dec": [ + "Proceed into cyberspace with confidence.", + "*applause*", + "Congratulations, prince of darkness.", + "Don't delete the .dat file", + "You can remove your hoodie now.", + "From nothing to something.", + "Time to take over the world.", + "Mainframe secured.", + "Don't steal my nuts!", + "Like pulling a rabbit from a hat, but with lots of math, computers, and it's actually nothing like pulling a rabbit from a hat." + ] +} +\ No newline at end of file diff --git a/Scripts/figENC.py b/Scripts/figENC.py @@ -6,7 +6,7 @@ import key, check from encrypt import enc_manager from decrypt import dec_manager import version_check as vc -from check import find_path +from path import find_path class App(): diff --git a/Scripts/path.py b/Scripts/path.py @@ -0,0 +1,29 @@ +import os, inspect, sys + +# def find_path(filename): +# """Return the correct filepath if you are running +# figENC as a bundled application + +# Keyword arguments: +# filename -- the filename to convert to a filepath +# """ +# try: +# base_path = sys._MEIPASS +# except Exception: +# base_path = os.path.abspath(".") +# return os.path.join(base_path, filename) + +def find_path(file): + """Return the correct filepath if you are running + figENC as a script + + Keyword arguments: + file -- the filename to convert to a filepath + """ + return os.path.dirname( + os.path.abspath( + inspect.getfile( + inspect.currentframe() + ) + ) + ) + "/{}".format(file) +\ No newline at end of file diff --git a/Scripts/prompts.py b/Scripts/prompts.py @@ -1,6 +1,7 @@ from tkinter import messagebox from random import choice - +from json import load +from path import find_path def overwrite_prompt(): """Opens a tkinter messagebox asking if the user wants to @@ -97,34 +98,8 @@ def success(mode): lst = "enc" else: lst = "dec" - fun_messages = { - "enc": [ - "Proceed into cyberspace with confidence.", - "*applause*", - "Congratulations, prince of darkness.", - "Don't delete the .dat file", - "You can remove your hoodie now.", - "D*ck pic hidden.", - "Time to take over the world.", - "Mainframe secured.", - "Don't steal my nuts!", - "Probably a little overkill" - ], - "dec": [ - "Proceed into cyberspace with confidence.", - "*applause*", - "Congratulations, prince of darkness.", - "Don't delete the .dat file", - "You can remove your hoodie now.", - "From nothing to something.", - "Time to take over the world.", - "Mainframe secured.", - "Don't steal my nuts!", - ("Like pulling a rabbit from a hat, but with lots of math," - " computers, and it's actually nothing like pulling a rabbit" - " from a hat.") - ] - } + with open(find_path("cookie.json")) as cookie_file: + fun_messages = load(cookie_file) messagebox.showinfo( "Success", "The operation was complete. %s"%choice(fun_messages[lst]) diff --git a/Scripts/version.txt b/Scripts/version.txt @@ -1 +1 @@ -2.3.5 -\ No newline at end of file +2.3.6 +\ No newline at end of file diff --git a/Scripts/version_check.py b/Scripts/version_check.py @@ -1,5 +1,5 @@ import requests, sys -from check import find_path +from path import find_path def update_available(): """Check against the current app version for @@ -12,13 +12,13 @@ def update_available(): git_import = requests.get( ("https://raw.githubusercontent.com/therealFIGBERT/figENC/" "master/Executables/figENC_MacOS/figENC.app/Contents/Resources" - "/version.txt" + "/version.txt?token=AEAWGCM6DNTALDSEJWBNUTC5UTU74" ) ).text else: git_import = requests.get( ("https://raw.githubusercontent.com/therealFIGBERT/figENC/" - "master/Executables/figENC_Windows/version.txt" + "master/Executables/figENC_Windows/version.txt?token=AEAWGCM6DNTALDSEJWBNUTC5UTU74" ) ).text except requests.exceptions.ConnectionError: