import os from cryptography.fernet import Fernet # Get the key securely key = os.getenv("DECRYPTION_KEY") fernet = Fernet(key.encode()) # Read encrypted file with open("encrypted_code.bin", "rb") as f: encrypted_code = f.read() # Decrypt and run exec(fernet.decrypt(encrypted_code).decode())