diff --git a/pyrogram/connection/transport/tcp/tcp_abridged_o.py b/pyrogram/connection/transport/tcp/tcp_abridged_o.py index 12a832f6..c5a9f65f 100644 --- a/pyrogram/connection/transport/tcp/tcp_abridged_o.py +++ b/pyrogram/connection/transport/tcp/tcp_abridged_o.py @@ -42,7 +42,7 @@ class TCPAbridgedO(TCP): while True: nonce = bytearray(os.urandom(64)) - if nonce[0] != b"\xef" and nonce[:4] not in self.RESERVED and nonce[4:4] != b"\x00" * 4: + if nonce[0] != b"\xef" and nonce[:4] not in self.RESERVED and nonce[4:8] != b"\x00" * 4: nonce[56] = nonce[57] = nonce[58] = nonce[59] = 0xef break diff --git a/pyrogram/connection/transport/tcp/tcp_intermediate_o.py b/pyrogram/connection/transport/tcp/tcp_intermediate_o.py index 5b267661..20eca3d4 100644 --- a/pyrogram/connection/transport/tcp/tcp_intermediate_o.py +++ b/pyrogram/connection/transport/tcp/tcp_intermediate_o.py @@ -42,7 +42,7 @@ class TCPIntermediateO(TCP): while True: nonce = bytearray(os.urandom(64)) - if nonce[0] != b"\xef" and nonce[:4] not in self.RESERVED and nonce[4:4] != b"\x00" * 4: + if nonce[0] != b"\xef" and nonce[:4] not in self.RESERVED and nonce[4:8] != b"\x00" * 4: nonce[56] = nonce[57] = nonce[58] = nonce[59] = 0xee break