From aeb4c3311713e6ae8402f57f5817d71727bb3c3b Mon Sep 17 00:00:00 2001 From: Dominik Fuhrmann <dominik.fuhrmann1@gmail.com> Date: Fri, 27 Dec 2024 10:06:04 +0100 Subject: [PATCH] improved scripts --- communication/client.py | 7 +- communication/server.py | 7 +- decryption/blowfish_128.py | 74 +++++++++++++++---- decryption/blowfish_64.py | 72 ++++++++++++++---- decryption/des_64.py | 67 ++++++++++++++--- decryption/rc4_128.py | 67 ++++++++++++++--- decryption/rc4_64.py | 67 ++++++++++++++--- keys/private.pem | 50 ++++++------- keys/public.pem | 14 ++-- setup/{logging.py => custom_logging.py} | 0 .../generateKeys.py => setup/generate_keys.py | 4 +- ...Installation.sh => python_installation.sh} | 0 12 files changed, 330 insertions(+), 99 deletions(-) rename setup/{logging.py => custom_logging.py} (100%) rename keys/generateKeys.py => setup/generate_keys.py (79%) rename setup/{pythonInstallation.sh => python_installation.sh} (100%) diff --git a/communication/client.py b/communication/client.py index ae8e6cb..c2b9c65 100644 --- a/communication/client.py +++ b/communication/client.py @@ -7,7 +7,10 @@ from Crypto.PublicKey import RSA from Crypto.Util.Padding import pad from Crypto.Random import get_random_bytes import base64 -from ../setup/logging.py import configure_logging, user_input +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging, user_input # Load the RSA public key to encrypt the key def load_public_key(): @@ -76,7 +79,7 @@ def main(): configure_logging() # server information - host = '127.0.0.1' + host = '192.168.178.51' port = 12345 # Load RSA public key (for encrypting the key) diff --git a/communication/server.py b/communication/server.py index 80f79f5..2523449 100644 --- a/communication/server.py +++ b/communication/server.py @@ -6,7 +6,10 @@ from Crypto.Cipher import DES, Blowfish, ARC4, PKCS1_OAEP from Crypto.PublicKey import RSA from Crypto.Util.Padding import unpad import base64 -from ../setup/logging.py import configure_logging, user_input +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging, user_input # Load the RSA private key to decrypt the key def load_private_key(): @@ -100,7 +103,7 @@ def main(): configure_logging() # server information - host = '127.0.0.1' + host = '192.168.178.51' port = 12345 # Load RSA private key (for decrypting the key) diff --git a/decryption/blowfish_128.py b/decryption/blowfish_128.py index 3ee0ddf..7224a3a 100644 --- a/decryption/blowfish_128.py +++ b/decryption/blowfish_128.py @@ -2,31 +2,77 @@ import logging from Crypto.Cipher import Blowfish from Crypto.Util.Padding import unpad import itertools -import base64 -from logger import setup_logging # Import logging configuration +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging -def brute_force_blowfish_128(ciphertext_base64, iv_hex): - ciphertext = base64.b64decode(ciphertext_base64) - iv = bytes.fromhex(iv_hex) +# Brute-force attack on Blowfish encryption (128-bit block size) +def brute_force_blowfish(ciphertext_hex, expected_plaintext, debug_key=None): + # Convert the hex string to bytes + decoded_ciphertext = bytes.fromhex(ciphertext_hex) - logging.info("Starting brute-force for Blowfish (128-bit key)...") - for key in itertools.product(range(256), repeat=16): # 128-bit key + # Extract the IV (the first 8 bytes) + iv = decoded_ciphertext[:8] + ciphertext = decoded_ciphertext[8:] # The rest is the encrypted text + + logging.info(f"Extracted IV (Hex): {iv.hex()}") + logging.info("Starting brute-force for Blowfish with 128-bit keys...") + + # Optional debug key + if debug_key: + try: + key = bytes.fromhex(debug_key) + cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv) + plaintext = unpad(cipher.decrypt(ciphertext), Blowfish.block_size) + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with debug key {key.hex()}") + return plaintext.decode() + else: + logging.warning("Debug key provided but failed to match the expected plaintext.") + except Exception as e: + logging.error(f"Error with debug key: {e}") + + # Brute-force key generation: all possible 8-byte keys (128 bits) + for key in itertools.product(range(256), repeat=16): key = bytes(key) try: + # Decrypt with the generated key cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv) plaintext = unpad(cipher.decrypt(ciphertext), Blowfish.block_size) - logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") - return plaintext.decode() + + # Check if the decrypted text matches the expected plaintext + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") + return plaintext.decode() except Exception: continue + logging.error("No matching key found.") return None def main(): - setup_logging() # Set up logging - ciphertext_base64 = input("Enter the Blowfish-encrypted text (Base64): ").strip() - iv_hex = input("Enter the initialization vector (IV) in hexadecimal (16 characters): ").strip() - brute_force_blowfish_128(ciphertext_base64, iv_hex) + # Configure colored logging + configure_logging() + + # Input the encrypted text as a hex string + ciphertext_hex = input("Enter the Blowfish-encrypted text (Hex, including IV): ").strip() + + # Optionally provide a debug key + debug_key = input("Enter a debug key in hex (or press Enter to skip): ").strip() + if not debug_key: + debug_key = None + + # Define the expected plaintext + expected_plaintext = "Test" + + # Call brute-force decryption + result = brute_force_blowfish(ciphertext_hex, expected_plaintext, debug_key) + + if result: + logging.info(f"Decrypted text: {result}") + else: + logging.error("Failed to decrypt the ciphertext.") if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/decryption/blowfish_64.py b/decryption/blowfish_64.py index cd2f193..ef2b512 100644 --- a/decryption/blowfish_64.py +++ b/decryption/blowfish_64.py @@ -2,31 +2,77 @@ import logging from Crypto.Cipher import Blowfish from Crypto.Util.Padding import unpad import itertools -import base64 -from logger import setup_logging # Import logging configuration +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging -def brute_force_blowfish_64(ciphertext_base64, iv_hex): - ciphertext = base64.b64decode(ciphertext_base64) - iv = bytes.fromhex(iv_hex) +# Brute-force attack on Blowfish encryption (64-bit block size) +def brute_force_blowfish(ciphertext_hex, expected_plaintext, debug_key=None): + # Convert the hex string to bytes + decoded_ciphertext = bytes.fromhex(ciphertext_hex) - logging.info("Starting brute-force for Blowfish (64-bit key)...") + # Extract the IV (the first 8 bytes) + iv = decoded_ciphertext[:8] + ciphertext = decoded_ciphertext[8:] # The rest is the encrypted text + + logging.info(f"Extracted IV (Hex): {iv.hex()}") + logging.info("Starting brute-force for Blowfish with 64-bit keys...") + + # Optional debug key + if debug_key: + try: + key = bytes.fromhex(debug_key) + cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv) + plaintext = unpad(cipher.decrypt(ciphertext), Blowfish.block_size) + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with debug key {key.hex()}") + return plaintext.decode() + else: + logging.warning("Debug key provided but failed to match the expected plaintext.") + except Exception as e: + logging.error(f"Error with debug key: {e}") + + # Brute-force key generation: all possible 8-byte keys (64 bits) for key in itertools.product(range(256), repeat=8): key = bytes(key) try: + # Decrypt with the generated key cipher = Blowfish.new(key, Blowfish.MODE_CBC, iv) plaintext = unpad(cipher.decrypt(ciphertext), Blowfish.block_size) - logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") - return plaintext.decode() + + # Check if the decrypted text matches the expected plaintext + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") + return plaintext.decode() except Exception: continue + logging.error("No matching key found.") return None def main(): - setup_logging() # Set up logging - ciphertext_base64 = input("Enter the Blowfish-encrypted text (Base64): ").strip() - iv_hex = input("Enter the initialization vector (IV) in hexadecimal (16 characters): ").strip() - brute_force_blowfish_64(ciphertext_base64, iv_hex) + # Configure colored logging + configure_logging() + + # Input the encrypted text as a hex string + ciphertext_hex = input("Enter the Blowfish-encrypted text (Hex, including IV): ").strip() + + # Optionally provide a debug key + debug_key = input("Enter a debug key in hex (or press Enter to skip): ").strip() + if not debug_key: + debug_key = None + + # Define the expected plaintext + expected_plaintext = "Test" + + # Call brute-force decryption + result = brute_force_blowfish(ciphertext_hex, expected_plaintext, debug_key) + + if result: + logging.info(f"Decrypted text: {result}") + else: + logging.error("Failed to decrypt the ciphertext.") if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/decryption/des_64.py b/decryption/des_64.py index 6049cd3..137c0c9 100644 --- a/decryption/des_64.py +++ b/decryption/des_64.py @@ -2,30 +2,77 @@ import logging from Crypto.Cipher import DES from Crypto.Util.Padding import unpad import itertools -import base64 +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging -def brute_force_des(ciphertext_base64, iv_hex): - ciphertext = base64.b64decode(ciphertext_base64) - iv = bytes.fromhex(iv_hex) +# Brute-force attack on DES encryption +def brute_force_des(ciphertext_hex, expected_plaintext, debug_key=None): + # Convert the hex string to bytes + decoded_ciphertext = bytes.fromhex(ciphertext_hex) + # Extract the IV (the first 8 bytes) + iv = decoded_ciphertext[:8] + ciphertext = decoded_ciphertext[8:] # The rest is the encrypted text + + logging.info(f"Extracted IV (Hex): {iv.hex()}") logging.info("Starting brute-force for DES (64-bit key)...") + + # Optional debug key + if debug_key: + try: + key = bytes.fromhex(debug_key) + cipher = DES.new(key, DES.MODE_CBC, iv) + plaintext = unpad(cipher.decrypt(ciphertext), DES.block_size) + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with debug key {key.hex()}") + return plaintext.decode() + else: + logging.warning("Debug key provided but failed to match the expected plaintext.") + except Exception as e: + logging.error(f"Error with debug key: {e}") + + # Brute-force key generation: all possible 8-byte keys for key in itertools.product(range(256), repeat=8): key = bytes(key) try: + # Decrypt with the generated key cipher = DES.new(key, DES.MODE_CBC, iv) plaintext = unpad(cipher.decrypt(ciphertext), DES.block_size) - logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") - return plaintext.decode() + + # Check if the decrypted text matches the expected plaintext + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") + return plaintext.decode() except Exception: continue + logging.error("No matching key found.") return None def main(): - setup_logging() - ciphertext_base64 = input("Enter the DES-encrypted text (Base64): ").strip() - iv_hex = input("Enter the initialization vector (IV) in hexadecimal (16 characters): ").strip() - brute_force_des(ciphertext_base64, iv_hex) + # Configure colored logging + configure_logging() + + # Input the encrypted text as a hex string + ciphertext_hex = input("Enter the DES-encrypted text (Hex, including IV): ").strip() + + # Optionally provide a debug key + debug_key = input("Enter a debug key in hex (or press Enter to skip): ").strip() + if not debug_key: + debug_key = None + + # Define the expected plaintext + expected_plaintext = "Test" + + # Call brute-force decryption + result = brute_force_des(ciphertext_hex, expected_plaintext, debug_key) + + if result: + logging.info(f"Decrypted text: {result}") + else: + logging.error("Failed to decrypt the ciphertext.") if __name__ == "__main__": main() \ No newline at end of file diff --git a/decryption/rc4_128.py b/decryption/rc4_128.py index 3175421..0d9a1ab 100644 --- a/decryption/rc4_128.py +++ b/decryption/rc4_128.py @@ -1,29 +1,72 @@ import logging from Crypto.Cipher import ARC4 import itertools -import base64 -from logger import setup_logging # Import logging configuration +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging -def brute_force_rc4_128(ciphertext_base64): - ciphertext = base64.b64decode(ciphertext_base64) +# Brute-force attack on RC4 encryption (128-bit key) +def brute_force_rc4(ciphertext_hex, expected_plaintext, debug_key=None): + # Convert the hex string to bytes + ciphertext = bytes.fromhex(ciphertext_hex) - logging.info("Starting brute-force for RC4 (128-bit key)...") - for key in itertools.product(range(256), repeat=16): # 128-bit key + logging.info("Starting brute-force for RC4 with 128-bit keys...") + + # Optional debug key + if debug_key: + try: + key = bytes.fromhex(debug_key) + cipher = ARC4.new(key) + plaintext = cipher.decrypt(ciphertext) + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with debug key {key.hex()}") + return plaintext.decode() + else: + logging.warning("Debug key provided but failed to match the expected plaintext.") + except Exception as e: + logging.error(f"Error with debug key: {e}") + + # Brute-force key generation: all possible 16-byte keys (128 bits) + for key in itertools.product(range(256), repeat=16): key = bytes(key) try: + # Decrypt with the generated key cipher = ARC4.new(key) plaintext = cipher.decrypt(ciphertext) - logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") - return plaintext.decode() + + # Check if the decrypted text matches the expected plaintext + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") + return plaintext.decode() except Exception: continue + logging.error("No matching key found.") return None def main(): - setup_logging() # Set up logging - ciphertext_base64 = input("Enter the RC4-encrypted text (Base64): ").strip() - brute_force_rc4_128(ciphertext_base64) + # Configure colored logging + configure_logging() + + # Input the encrypted text as a hex string + ciphertext_hex = input("Enter the RC4-encrypted text (Hex): ").strip() + + # Optionally provide a debug key + debug_key = input("Enter a debug key in hex (or press Enter to skip): ").strip() + if not debug_key: + debug_key = None + + # Define the expected plaintext + expected_plaintext = "Test" + + # Call brute-force decryption + result = brute_force_rc4(ciphertext_hex, expected_plaintext, debug_key) + + if result: + logging.info(f"Decrypted text: {result}") + else: + logging.error("Failed to decrypt the ciphertext.") if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/decryption/rc4_64.py b/decryption/rc4_64.py index 5fbb0f3..89f695a 100644 --- a/decryption/rc4_64.py +++ b/decryption/rc4_64.py @@ -1,29 +1,72 @@ import logging from Crypto.Cipher import ARC4 import itertools -import base64 -from logger import setup_logging # Import logging configuration +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'setup'))) +from custom_logging import configure_logging -def brute_force_rc4(ciphertext_base64): - ciphertext = base64.b64decode(ciphertext_base64) +# Brute-force attack on RC4 encryption (64-bit key) +def brute_force_rc4(ciphertext_hex, expected_plaintext, debug_key=None): + # Convert the hex string to bytes + ciphertext = bytes.fromhex(ciphertext_hex) - logging.info("Starting brute-force for RC4 (64-bit key)...") - for key in itertools.product(range(256), repeat=8): # 64-bit key + logging.info("Starting brute-force for RC4 with 64-bit keys...") + + # Optional debug key + if debug_key: + try: + key = bytes.fromhex(debug_key) + cipher = ARC4.new(key) + plaintext = cipher.decrypt(ciphertext) + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with debug key {key.hex()}") + return plaintext.decode() + else: + logging.warning("Debug key provided but failed to match the expected plaintext.") + except Exception as e: + logging.error(f"Error with debug key: {e}") + + # Brute-force key generation: all possible 8-byte keys (64 bits) + for key in itertools.product(range(256), repeat=8): key = bytes(key) try: + # Decrypt with the generated key cipher = ARC4.new(key) plaintext = cipher.decrypt(ciphertext) - logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") - return plaintext.decode() + + # Check if the decrypted text matches the expected plaintext + if plaintext.decode() == expected_plaintext: + logging.info(f"Decrypted successfully: {plaintext.decode()} with key {key.hex()}") + return plaintext.decode() except Exception: continue + logging.error("No matching key found.") return None def main(): - setup_logging() # Set up logging - ciphertext_base64 = input("Enter the RC4-encrypted text (Base64): ").strip() - brute_force_rc4(ciphertext_base64) + # Configure colored logging + configure_logging() + + # Input the encrypted text as a hex string + ciphertext_hex = input("Enter the RC4-encrypted text (Hex): ").strip() + + # Optionally provide a debug key + debug_key = input("Enter a debug key in hex (or press Enter to skip): ").strip() + if not debug_key: + debug_key = None + + # Define the expected plaintext + expected_plaintext = "Test" + + # Call brute-force decryption + result = brute_force_rc4(ciphertext_hex, expected_plaintext, debug_key) + + if result: + logging.info(f"Decrypted text: {result}") + else: + logging.error("Failed to decrypt the ciphertext.") if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/keys/private.pem b/keys/private.pem index 44a3031..d78f154 100644 --- a/keys/private.pem +++ b/keys/private.pem @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA3rQBwcolop8zkonx/+JsyvWtMGBxdXBNRufBnc5nIF+pKjpc -BTLTdlZx2K85Xj1Rz1waGOdf78oBECfeOb6ckeLm86JliQlKS9vkEROuxfagO5jz -2qW/BHuYIbxS0O9vdrShoC8tw+qci1pMsVu7IBLHMO+mJ3NLVCv9HL+fAYRntrpE -yx+j9HdZqmy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+zAvF3YCQ4D/1XnQSQcuzjl5uGKhkFc4WyL+BDSUTNxdqtbHS +1k6XuMvbaMSOfntO8YeW8uzJ9DF50hW7MU6fadgGjeOi3VGveq6mhSpHeYlf7YSS +VXzIbkaRCCpkM6sstEvhBmKgIYeudn4rnSVn/Swc0PRc4D+nenqbP10CgYEA8f3E +78+pMt0hWO4kd05Rfscd94XeiNdFzDt+1ixFwuFLsl1bpWMUH5xhoffcyGdPqH0/ +ha6VN7fcjoGutB8Km1ed7d9ZCM4T8OJtg8JKRUJsjyCudQx0hY6lPeUYGHfc2bzY +6HGjbIlBuGeM8dbL1tsyZzdkTX6qxTbiEfDU1QkCgYAISAOT0zMxGA6gjGYIINVH +u9+PU7NNTfkF02ma69UQy9ICbu5L1oXY6KmdJo+3h2uJGx129D/FwAwJlJqW7TzD +KbOp3loD6GVaEAu58IOq5oyEBCTBoGaW8aKImEjJ5cKnN69AP27XbbWdHVqKW1kl +j4CXwtIwfjXctSbL82OGEQKBgEHI0vi+YyjIpIAgfRlR2SW1y5e2dMCOhRL4OYrP +jkdkJ8fdSUS0oovVX1VApGx2aVlMczBMPZRgDz1OU8fziFaigvRfezzBiPo7E7p1 +3urlG83s/IAlWqfUF2e0F9DPBOLMS8sk2WBwD8WpoM89rTxDanhUvpeyj4n9WYe3 +CKTBAoGAe6k2o0tCz4tGiPNAhGHRY3i3FLOhUWbKOHMDu2RAoFQTdEjKwuYOpjXN +3sfWy2wJoz+v2+qrKKKL3nOmjMBLS0r+RkBf4QaNqA9wJ6hikrqsEe6tczazO9Ic +UzOXV2wexb1i65B6SuNWE1V0ZEL1tyxHnPJwI42qkyXViFw0tyU= -----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/keys/public.pem b/keys/public.pem index 1094f76..a9c58dd 100644 --- a/keys/public.pem +++ b/keys/public.pem @@ -1,9 +1,9 @@ -----BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3rQBwcolop8zkonx/+Js -yvWtMGBxdXBNRufBnc5nIF+pKjpcBTLTdlZx2K85Xj1Rz1waGOdf78oBECfeOb6c -keLm86JliQlKS9vkEROuxfagO5jz2qW/BHuYIbxS0O9vdrShoC8tw+qci1pMsVu7 -IBLHMO+mJ3NLVCv9HL+fAYRntrpEyx+j9HdZqmyJRriWrHCjN1/dnJoUt5dABGXT -Iny0BlUQJE5CrfP7oGb0fCvzO5MsSy5/W9rl2O8bZLbbNXJxDoWzsM87YLL7SqUw -q2SDZpy6DPO+NW9S3tqplwoI+CqjtId5t9FbZ/eQJXSm2bCUAl8MMToUQp9385ew -3wIDAQAB +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjw3DrDWxWtPLWdyGbNT +MMUlDXmR+nFItaifmR9BFnbVVGMEXwr6BMrtdDOqPkP544c7HzpIsnTfncs0DLvc +c0YGXgst1Yeoh5IugoUj4bU65f/1JUaXJniTAPUBOAKLNSweUmzRTeXMbpI5M1Es +3ZTBVhFZ10xVPJQu20EkYcPrf7bX+ALvNackyXfnLd1aUKGPggFwKMcmfiXPFlJZ +Jyr9vUoGepu/LOihVliM8s7dHV+76uqBRx5sKarY2TLq+CzRWOcSH6Jp/EeJXE+c +e/mpZuBHMpKhE1NB9fIjYB0qq8Es0TD//pTi9d9gA2khcw3rNS9TrTV90i52JDGb +RQIDAQAB -----END PUBLIC KEY----- \ No newline at end of file diff --git a/setup/logging.py b/setup/custom_logging.py similarity index 100% rename from setup/logging.py rename to setup/custom_logging.py diff --git a/keys/generateKeys.py b/setup/generate_keys.py similarity index 79% rename from keys/generateKeys.py rename to setup/generate_keys.py index 77d8545..792ef26 100644 --- a/keys/generateKeys.py +++ b/setup/generate_keys.py @@ -7,10 +7,10 @@ def main(): public_key = private_key.publickey() # Save as files - with open('private.pem', 'wb') as private_file: + with open('../keys/private.pem', 'wb') as private_file: private_file.write(private_key.export_key()) - with open('public.pem', 'wb') as public_file: + with open('../keys/public.pem', 'wb') as public_file: public_file.write(public_key.export_key()) print("RSA-keys generated and saved.") diff --git a/setup/pythonInstallation.sh b/setup/python_installation.sh similarity index 100% rename from setup/pythonInstallation.sh rename to setup/python_installation.sh -- GitLab