mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
More nonce check fixes
This commit is contained in:
parent
14c5303272
commit
761e4735d3
@ -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:8] != b"\x00" * 4:
|
||||
if bytes([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
|
||||
|
||||
|
@ -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:8] != b"\x00" * 4:
|
||||
if bytes([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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user