Scapy: Low level packet hacking toolkit for Python
trickster.dev
trickster.dev
Coupled with interfaces to import and export PCAP files, it’s also a great way to learn about or explore/tamper with network protocols.
The fact that it’s implemented in Python might scare some off, but I personally feel that this only adds to its usefulness since it can benefit from all of the external tooling and flexibility that comes with the language.
If you are parsing packet captures or defining custom protocols then dpkt[0] is also worth a look. It's a simpler module with substantially higher performance.
Scapy: a powerful interactive packet manipulation program - https://news.ycombinator.com/item?id=4892380 - Dec 2012 (13 comments)
Traceroute in 15 lines of code using Scapy - https://news.ycombinator.com/item?id=6653644 - Nov 2013 (2 comments)
OTOH, really amazing project to put together quick packet-level prototypes. Really shows the strength of the python ecosystem.
Since you didn’t mention a platform, also note that (last I looked) WSL was inadequate for crafting raw packets.