diff --git a/nxbender/__init__.py b/nxbender/__init__.py index 9e950fe..12153d6 100644 --- a/nxbender/__init__.py +++ b/nxbender/__init__.py @@ -18,7 +18,7 @@ parser.add_argument('-d', '--domain', required=True) parser.add_argument('-f', '--fingerprint', help='Verify server\'s SSL certificate has this fingerprint. Overrides all other certificate verification.') -parser.add_argument('-m', '--mtu', type=int, default=1280, help='Connection Maximum Transmission Unit (MTU), used to determine size of packets sent to server.') +parser.add_argument('-m', '--max-line', type=int, default=1514, help='Maximum length of a single line of PPP data sent to the server') parser.add_argument('--debug', action='store_true', help='Show debugging information') parser.add_argument('-q', '--quiet', action='store_true', help='Don\'t output basic info whilst running') diff --git a/nxbender/sslconn.py b/nxbender/sslconn.py index d972a06..273cda8 100644 --- a/nxbender/sslconn.py +++ b/nxbender/sslconn.py @@ -56,9 +56,6 @@ def __init__(self, session_id, *args, **kwargs): self.buf = b'' self.wbuf = b'' - # Set the length of lines over the TLS connection to ensure result fits in one packet. - # Overhead is 2 bytes at start, 2 bytes line ending - self.line_length = self.options.mtu - 4 def fileno(self): return self.s.fileno() @@ -111,7 +108,7 @@ def writes_pending(self): def write_pump(self): while len(self.wbuf): - packet = self.wbuf[:self.line_length] + packet = self.wbuf[:self.options.max_line] buf = struct.pack('>L', len(packet)) + packet self.s.sendall(buf) self.wbuf = self.wbuf[len(packet):]