figenc

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

commit 7f1eb4abb4c33e190644a891d97aeda78b70c1e3
parent c4946b394c27aeda0499d30d5861e664df043ec0
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Wed, 24 Jul 2019 15:04:19 -0700

Updating version verification method

Diffstat:
DScripts/_version.py | 3---
MScripts/figENC.py | 25+++++++++++++++++++++++++
AScripts/version.txt | 2++
AScripts/version_check.py | 11+++++++++++
4 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/Scripts/_version.py b/Scripts/_version.py @@ -1,2 +0,0 @@ -__version_info__ = (0, 0, 0) -__version__ = ".".join(map(str, __version_info__)) -\ No newline at end of file diff --git a/Scripts/figENC.py b/Scripts/figENC.py @@ -2,9 +2,11 @@ from sys import platform import tkinter as tk from random import choice import json +import requests from initiate_key import rsa_key from encrypt import rsa_enc from decrypt import rsa_dec +import version_check import check @@ -411,6 +413,29 @@ class App(): ) self.scroll_menu.config(bg="#1A181C", fg="#643181") self.scroll_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( + self.update_frame, + text="Update Status: ", + justify=tk.LEFT, + font=("Arial", str(self.settings["font_size"])), + bg="#1A181C", + fg="#F2DAFF", + pady=2 + ) + self.update_label.pack(side=tk.LEFT) + self.update_bool = version_check.update_available() + self.update_status = tk.Label( + self.update_frame, + text="Available" if self.update_bool else "Up to date!", + justify=tk.LEFT, + font=("Arial", str(self.settings["font_size"])), + bg="#1A181C", + fg="#F2DAFF", + pady=2 + ) + self.update_status.pack(side=tk.LEFT) self.save_frame = tk.Frame(self.frame, bg="#1A181C") self.save_frame.pack(side=tk.BOTTOM, fill=tk.BOTH, pady=5, padx=5) if platform == "darwin": diff --git a/Scripts/version.txt b/Scripts/version.txt @@ -0,0 +1 @@ +0.0.0 +\ No newline at end of file diff --git a/Scripts/version_check.py b/Scripts/version_check.py @@ -0,0 +1,10 @@ +import requests + +def update_available(): + git_import = int(requests.get("https://raw.githubusercontent.com/therealFIGBERT/figENC/master/Scripts/_version.py").text) + with open("version.txt") as local: + local_version = int(local.read()) + if local_version < git_import: + return True + else: + return False +\ No newline at end of file