Hello,
This first packet had an MSS TCP option set. The error is caused
when the packet is parsed: the single value in the tuple returned by
struct.unpack() on the MSS value was not extracted, and caused an
unsupported operand exception when to_bytes was later called to
write the packet out. The fix is to append [0] to extract the first
tuple value. I didn't see any other options for which a single value
was unpacked.
On a related note - I beleive that the Window Scaling TCP option is
also not parsed correctly.
In tcp.py the following change worked for me.
elif arr[i] == tcp_opt.WSOPT:
if arr[i+1] != 3:
raise Exception()
+val = struct.unpack('!H',arr[i+2:i+3])[0]
+self.options.append(tcp_opt(tcp_opt.WSOPT, val))
-self.options.append(tcp_opt(tcp_opt.WSOPT, arr[i+1]))
Best regards,
Zdravko
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org