Search code examples
pythonwiresharkscapypacketflooding

How to ask Scapy to send packets faster, say 1000pps


I just wanna control the velocity of packet generation, because Scapy is too slow to send packets by default using "send". Some suggestions say "sendpfast" can specify PPS, however, it doesn't work in my script, neither does "sendp". After replace "send" with "sendp"/"sendpfast", I noticed that there was nothing on Wireshark, the packets were not sent. what am I missing?


Solution

  • Use sendpfast() and add the second layer to your packets. This would mean simply adding

    Ether()/...
    

    Before each packet.