I tried to send 255 differnet arp packets via scapy with sendp and all those packets were sent in seconds, but when I try to send ICMP packets it takes a lot of time until every packet is being sent.... Can you tell me please how to send those ICMP packets as fast as the ARP packets? Thanks
for ip in get_all_ip():
pkt1 = Ether(dst = "ff:ff:ff:ff:ff:ff", type = 2054)/ARP(pdst = ip)
pkt2 = Ether()/IP(dst = ip)/ICMP()
packets_ip.append(pkt2)
packets_p.append(pkt1)
sendp(packets_p) # Takes seconds
send(packets_ip) # Takes a lot of time
I don't know what you are trying to do, but you are using send()
with Ethernet packets. send()
is used to send "layer 3" packets (e.g., IP()
or IPv6()
).