solveed all week02
This commit is contained in:
@ -73,7 +73,7 @@ def handle_packet(packet: Packet):
|
||||
send(initial_syn)
|
||||
|
||||
else:
|
||||
if (0x02 in packet[TCP].flags) or (not seq == expected_cookie) or (not ack == INITIAL_SEQ):
|
||||
if ("S" in packet[TCP].flags) or (not seq == expected_cookie) or (not ack == INITIAL_SEQ):
|
||||
print(f'Invalid cookie {seq}, expected {expected_cookie}')
|
||||
rst = get_rst(src_ip, src_port, seq)
|
||||
send(rst)
|
||||
|
Reference in New Issue
Block a user