From 9fc03647c9c481953cb16be0b319332c9696d665 Mon Sep 17 00:00:00 2001 From: Confused Character <121636230+ConfusedCharacter@users.noreply.github.com> Date: Fri, 16 Feb 2024 20:28:53 +0330 Subject: [PATCH] Update tcpmtproxy.py --- telethon/network/connection/tcpmtproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/network/connection/tcpmtproxy.py b/telethon/network/connection/tcpmtproxy.py index 08769b3f..e3ef98a5 100644 --- a/telethon/network/connection/tcpmtproxy.py +++ b/telethon/network/connection/tcpmtproxy.py @@ -139,7 +139,7 @@ class TcpMTProxy(ObfuscatedConnection): try: secret_bytes = bytes.fromhex(secret) except ValueError: - secret = secret + '=' * (-len(s) % 4) + secret = secret + '=' * (-len(secret) % 4) secret_bytes = base64.b64decode(secret.encode()) return secret_bytes[:16] # Remove the domain from the secret (until domain support is added)