From 8c428e856621b84bd912c2e194137e4e3e4600fa Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" Date: Mon, 11 Feb 2019 07:54:59 +1000 Subject: [PATCH] Fix broken connection establishment in ConnectionTcpObfuscated This regression was introduced in ebde3be82030bb89a8fa461d420a777bc827eda7. --- telethon/network/connection/tcpobfuscated.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telethon/network/connection/tcpobfuscated.py b/telethon/network/connection/tcpobfuscated.py index adac2d67..7c83dfa6 100644 --- a/telethon/network/connection/tcpobfuscated.py +++ b/telethon/network/connection/tcpobfuscated.py @@ -1,5 +1,6 @@ import os +from .connection import Connection from .tcpabridged import ConnectionTcpAbridged from ...crypto import AESModeCTR @@ -22,7 +23,8 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged): return self._aes_decrypt.encrypt(await self._reader.readexactly(n)) async def connect(self, timeout=None, ssl=None): - await super().connect(timeout=timeout, ssl=ssl) + # FIXME: that's an abstraction leak + await Connection.connect(self, timeout=timeout, ssl=ssl) # Obfuscated messages secrets cannot start with any of these keywords = (b'PVrG', b'GET ', b'POST', b'\xee\xee\xee\xee')