diff --git a/telethon/network/connection/tcpobfuscated.py b/telethon/network/connection/tcpobfuscated.py index e3a00d89..adac2d67 100644 --- a/telethon/network/connection/tcpobfuscated.py +++ b/telethon/network/connection/tcpobfuscated.py @@ -28,7 +28,7 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged): keywords = (b'PVrG', b'GET ', b'POST', b'\xee\xee\xee\xee') while True: random = os.urandom(64) - if (random[0] != b'\xef' and + if (random[0] != 0xef and random[:4] not in keywords and random[4:4] != b'\0\0\0\0'): break