0
Ich möchte nur IP.dst zu txt-Datei ausgeben, aber ich alle das Paket Informationen einschließlich Ether, src, etcPython scapy Ausgabe in txt-Datei
from scapy.all import *
import time
import os
file = open("newfile.txt","w")
t = '%IP.dst%'
p = sniff(filter="ip", prn=lambda x:x.sprintf(t), count=10)
file.write(str(p))
time.sleep(1)
os.system("cls")
Beispiel für die Ausgabe von TXT-Datei
Ether dst = f4: ce: 46: 5c: bf: f8 src = 30: 10: b3: 24: 63: b6 type = 0x800/| IP version = 4L IHL = 5L
Ja danke @ Noob123 – TeckSupport