I am using the sniff() function of Scapy to sniff packet from the ethernet. I store it in a variable called pkt. Later I want to make a copy of the same by appending contents of pkt in another variable buffpkt. Initially I declared both the variables as list but once pkt store the sniff() output it changes its type to instance. Below is the code.
pkt=[]
buffpkt=[]
pkt=sniff(prn=lambda x:x.sprintf("{IP : %IP.src% %IP.dst%\n\n} "),timeout=5,store=1)
buffpkt=pkt
I want to make a big list of all the packets sniffed by appending the results to buffpkt but I cannot. Any suggestions?