|
@ -84,7 +84,14 @@ class tls_ticket_auth(plain.plain): |
|
|
if self.handshake_status == -1: |
|
|
if self.handshake_status == -1: |
|
|
return buf |
|
|
return buf |
|
|
if self.handshake_status == 8: |
|
|
if self.handshake_status == 8: |
|
|
return b"\x17" + self.tls_version + struct.pack('>H', len(buf)) + buf |
|
|
ret = b'' |
|
|
|
|
|
while len(buf) > 2048: |
|
|
|
|
|
size = min(struct.unpack('>H', os.urandom(2))[0] % 4096 + 100, len(buf)) |
|
|
|
|
|
ret += b"\x17" + self.tls_version + struct.pack('>H', size) + buf[:size] |
|
|
|
|
|
buf = buf[size:] |
|
|
|
|
|
if len(buf) > 0: |
|
|
|
|
|
ret += b"\x17" + self.tls_version + struct.pack('>H', len(buf)) + buf |
|
|
|
|
|
return ret |
|
|
self.send_buffer += b"\x17" + self.tls_version + struct.pack('>H', len(buf)) + buf |
|
|
self.send_buffer += b"\x17" + self.tls_version + struct.pack('>H', len(buf)) + buf |
|
|
if self.handshake_status == 0: |
|
|
if self.handshake_status == 0: |
|
|
self.handshake_status = 1 |
|
|
self.handshake_status = 1 |
|
@ -149,8 +156,8 @@ class tls_ticket_auth(plain.plain): |
|
|
return buf |
|
|
return buf |
|
|
if self.handshake_status == 8: |
|
|
if self.handshake_status == 8: |
|
|
ret = b'' |
|
|
ret = b'' |
|
|
while len(buf) > 4196: |
|
|
while len(buf) > 2048: |
|
|
size = struct.unpack('>H', os.urandom(2))[0] % 4096 + 100 |
|
|
size = min(struct.unpack('>H', os.urandom(2))[0] % 4096 + 100, len(buf)) |
|
|
ret += b"\x17" + self.tls_version + struct.pack('>H', size) + buf[:size] |
|
|
ret += b"\x17" + self.tls_version + struct.pack('>H', size) + buf[:size] |
|
|
buf = buf[size:] |
|
|
buf = buf[size:] |
|
|
if len(buf) > 0: |
|
|
if len(buf) > 0: |
|
|