Ich möchte durch ein PPAP-Dateipaket für Paket mit Python/Scapy durchlaufen. Die Datei hat mehrere Protokolle. Aktuell ist die Iteration protokollspezifisch, so dass die Iteration einen "Sprung" macht, wenn das nächste Paket von einem anderen Protokoll stammt. Ich weiß nicht, warum das momentan so ist. Ich möchte Paket für Paket, egal welches Protokoll.Iterieren durch PPAP-Dateipaket für Paket mit Python/Scapy
kleines Beispiel:
data = 'new.pcap'
zz = rdpcap(data)
sessions = zz.sessions()
for session in sessions:
for packet in sessions[session]:
eth_src = packet[Ether].src
eth_type = packet[Ether].type
if eth_src == "00:22:97:04:06:b9" and eth_type == 0x8100:
# do anything
elif eth_src == "00:22:97:04:06:b9" and eth_type == 0x22f0:
# do anything
else:
# do anything
Kennt jemand den Grund?
Works, danke! – crappidy