From 3f156d5f5781ac51e0ef1b9283aa3e58d97bc917 Mon Sep 17 00:00:00 2001 From: ericshermancs Date: Wed, 25 Dec 2019 23:21:04 -0500 Subject: [PATCH 1/2] update security.py to run standalone --- src/helper/security.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helper/security.py b/src/helper/security.py index e419e06..a2117a9 100644 --- a/src/helper/security.py +++ b/src/helper/security.py @@ -18,7 +18,7 @@ def gen_keys(): file_out = open("keys/public.pem", "wb") file_out.write(public_key) file_out.close() - print("WARNING:: Don't forget to update the index.php") + print("Keys have been written to keys/") def encrypt(message, path='keys/public.pem'): key = RSA.importKey(open(path).read()) @@ -33,3 +33,7 @@ def decrypt(ciphertext_base64, path='keys/private.pem'): ciphertext = base64.b64decode(ciphertext_base64) message = cipher.decrypt(ciphertext) return message + + +if __name__ == '__main__': + gen_keys() \ No newline at end of file From b64cd9cd8c51ec99321bab95a540337bc260682b Mon Sep 17 00:00:00 2001 From: Eric Sherman Date: Thu, 26 Dec 2019 00:05:06 -0500 Subject: [PATCH 2/2] Update dependencies.pip --- Depfiles/dependencies.pip | 1 + 1 file changed, 1 insertion(+) diff --git a/Depfiles/dependencies.pip b/Depfiles/dependencies.pip index 62b8149..c6c40ce 100644 --- a/Depfiles/dependencies.pip +++ b/Depfiles/dependencies.pip @@ -8,3 +8,4 @@ colorconsole cunyfirstapi mysql mysql-connector +pycryptodome