From 6f35105ea28d22e8b2f8f08fda29d05748aeb3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Sat, 18 Mar 2017 18:00:36 +0800 Subject: [PATCH] fix syntax --- shadowsocks/obfsplugin/obfs_tls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks/obfsplugin/obfs_tls.py b/shadowsocks/obfsplugin/obfs_tls.py index ffb7646..b76b08b 100644 --- a/shadowsocks/obfsplugin/obfs_tls.py +++ b/shadowsocks/obfsplugin/obfs_tls.py @@ -174,7 +174,7 @@ class tls_ticket_auth(plain.plain): data = b"\x16\x03\x03" + struct.pack('>H', len(data)) + data if random.randint(0, 255) < 128: ticket = os.urandom((struct.unpack('>H', os.urandom(2))[0] % 256) + 64) - ticket = struct.pack('>H', len(ticket) + 4) b"\x04\x00" + struct.pack('>H', len(ticket)) + ticket = struct.pack('>H', len(ticket) + 4) + b"\x04\x00" + struct.pack('>H', len(ticket)) data += b"\x16" + self.tls_version + ticket #New session ticket data += b"\x14" + self.tls_version + b"\x00\x01\x01" #ChangeCipherSpec data += b"\x16" + self.tls_version + b"\x00\x20" + os.urandom(22) #Finished