2 ms·
How to send raw network packets in Python with tun/tap
- zamadatix 4y agoHonorable mention: If you create a VXLAN interface instead of a TUN/TAP interface you can send/receive packets via normal UDP streams with no platform specific logic in your code (assuming UDP networking is part of the std lib of your language of choice). I wouldn't recommend using that solution in production but it's great for quick and easy ground up testing/hacking assuming you don't need to control the buffer exactly you just want to send some bits.
- GekkePrutser 4y agoScapy is also super handy for this: https://pypi.org/project/scapy/ https://pypi.org/project/scapy/