encryptor provided: def encrypt(data, key): return bytes([octet ^ key for octet in…
- User
encryptor provided:
def encrypt(data, key): return bytes([octet ^ key for octet in data]) key = input('Enter a key (single character): ') if len(key) != 1: raise ValueError("Key must be a single character!") key = ord(key[0]) message = input('Enter a message: ').strip().encode('ascii') encrypted = encrypt(message, key) with open('message.encrypted', 'wb') as fout: fout.write(encrypted) print("Message encrypted and saved to 'message.encrypted'")
message:
2A AA A AA
A A A A AA A AA A A A A A AA AAA WYUTVQ S QUX QRQ YRSXS XWX
clue:
Sending messages between sea captains is like a game of telephone—except the phone is a parrot, and half the message gets lost to rum. Decode the message.
Requirements:
The output needs to have ctf{...} in it
- Assistant