diff --git a/matrix/matrix-get-messages-from-encrypted-room-via-backup.py b/matrix/matrix-get-messages-from-encrypted-room-via-backup.py index 7f0558b..53bf85e 100755 --- a/matrix/matrix-get-messages-from-encrypted-room-via-backup.py +++ b/matrix/matrix-get-messages-from-encrypted-room-via-backup.py @@ -206,7 +206,7 @@ class UngleichMatrixClient: print("session key = {session_key_base64}, {length}".format(session_key_base64=session_key_base64, length=len(session_key_base64))) - return session_key + return session_key_base64 def decrypt_message(self, ciphertext, session_id): room_key = self.room_keys['rooms'][self.room_id]['sessions'] @@ -221,9 +221,9 @@ class UngleichMatrixClient: session_mac) inbound_group = InboundGroupSession.import_session(session_key_base64) - plaintext = inbound_group.decrypt(message_ciphertext_base64) + plaintext = inbound_group.decrypt(ciphertext) - print(f"Encrypted {ciphertext} = {plaintext}") + print(f"Encrypted message {ciphertext} = {plaintext}") def decrypt_room_messages(self): """