How to filter packets for a list of IP using Scapy

Viewed 2905

I am trying to filter packets of a particular website in Python (using Scapy). I have a list of possible IPs (used for load balancing) of the website. I want to filter packets for all those IPs. How can I do that?

For a single IP, I am using the following code:

bpf_filter = "ip and host " + addr
sniff(timeout=10, prn=pkt_callback, store=0)
1 Answers
Related