Using Scapy
Basics
iptables βA OUTPUT βp tcp βtcp-flags RST RST βj DROP# send and receive [packet], define the return as ans and unans with β_β, print the summary
sr([packet]);
ans, unans = _
ans.summary()
# send a TCP snipe to end the connection, must hit the correct seq from the most recent ack in order to be accepted
send(IP(dst=β192.168.1.200β)/TCP(sport=45089, dport=999, flags=βRAβ, seq=3689929657))
i = sniff(filter=βhost 192.168.1.100 and icmpβ, count=2)
i.summary()Last updated