This is my code:
from scapy.all import *
packets = rdpcap('secret.pcap')
packet_join = []
for packet in packets:
if packet.haslayer('TCP'):
raw_data = packet.getlayer(Raw)
packet_join.append(raw_data)
I only found the getlayer(Raw) from some googling.
My question is, is there a list of the layers I can use for getlayer somewhere? Or more detailed documentation on its use? I couldn't find much in the Scapy documentation.
I know you can also use things like getlayer(TCP)