From 99043fb8cfd635b863ed4263b3351ae5f82c68f2 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Mon, 11 Feb 2019 14:07:49 +0200 Subject: [PATCH] Hotfix from crypto --- monkey/monkey_island/cc/encryptor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/encryptor.py b/monkey/monkey_island/cc/encryptor.py index 3a3d052f6..84e6fba9d 100644 --- a/monkey/monkey_island/cc/encryptor.py +++ b/monkey/monkey_island/cc/encryptor.py @@ -39,7 +39,7 @@ class Encryptor: def enc(self, message): cipher_iv = Random.new().read(AES.block_size) cipher = AES.new(self._cipher_key, AES.MODE_CBC, cipher_iv) - return base64.b64encode(cipher_iv + cipher.encrypt(self._pad(message))) + return base64.b64encode(cipher_iv + cipher.encrypt(str(self._pad(message)))) # ciper.encrypt expects str def dec(self, enc_message): enc_message = base64.b64decode(enc_message)