Carlos soares Carlos soares - 4 months ago 15
Python Question

Filter only TCP SYN segments in scapy

How can I filter only TCP SYN segments in Scapy?
Could someone give me a simple example, please?
I tried hard but I dont know scapy!

Answer

Only TCP SYN segments:

tcp[tcpflags] & tcp-syn != 0