generate dummy packets of fixed size

2019-08-12 22:20发布

Hi I would like to generate dummy packets of fixed size say 1400 bytes using python. After generation I would like to stream it over the network using UDP broadcast along with the sequence numbers for each packet. Is there any possible ways to do this.

1条回答
Anthone
2楼-- · 2019-08-12 22:57

Try using scapy.

A simple UDP packet can be sent using a simple 1-liner such as send(IP(dst="192.168.0.255")/UDP(dport=0)/("X"*1400))

查看更多
登录 后发表回答