mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-23 06:19:52 +03:00
Update mtproto_sender.py
Now, it's working for me
This commit is contained in:
parent
7a63c1ba58
commit
b6e7f1f26d
|
@ -158,10 +158,11 @@ class MtProtoSender:
|
|||
msg_key = reader.read(16)
|
||||
|
||||
key, iv = utils.calc_key(self.session.auth_key.key, msg_key, False)
|
||||
if reader.read(len(body) - reader.tell_position()) % 16 != 0:
|
||||
data = reader.read(len(body) - reader.tell_position())
|
||||
if len(data) % 16 != 0:
|
||||
raise SecurityError('AES block size missmatch')
|
||||
plain_text = AES.decrypt_ige(
|
||||
reader.read(len(body) - reader.tell_position()), key, iv)
|
||||
data, key, iv)
|
||||
|
||||
with BinaryReader(plain_text) as plain_text_reader:
|
||||
plain_text_reader.read_long() # remote_salt
|
||||
|
|
Loading…
Reference in New Issue
Block a user