mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Fix nonce checks
This commit is contained in:
parent
94c0031ed7
commit
88af58f246
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue