I'm reading a pcap file using scapy
and I am interested in finding anomalies such as unusual TCP flags or HTTP codes like 403
, 429
etc.
I am able to find out using TCP ports that this traffic belongs to HTTP but how to get status codes of HTTP and flags of TCP?
This is what I have done so far:
for pkt in PcapReader(pcap):
if (TCP in pkt and (pkt[TCP].sport == 80 or pkt[TCP].dport === 80)):
pList.append(pkt)