diff --git a/RSA/client/main.py b/RSA/client/main.py index 5211bf3..a7910a6 100644 --- a/RSA/client/main.py +++ b/RSA/client/main.py @@ -1,22 +1,10 @@ from flask import * import ssl import requests -from Crypto.PublicKey import RSA +from Crypto import RSA -def resetKeys(privateKeyFile, publicKeyFile): - keys = RSA.generate(1024) - with open("ssl/" + privateKeyFile, 'wb') as privHandle: - privHandle.write(keys.export_key()) - - with open("ssl/" + publicKeyFile, 'wb') as pubHandle: - pubHandle.write(keys.publickey().export_key()) - -resetKeys("private.key", "public.key") - -with open("ssl/public.key", 'r') as pubHandle: - public_serv = pubHandle.read() - -print(public_serv) data = 'Hello World !' +requests.post('https://localhost:5000',data) +