Secdev Scapy
Scapy: the Python-based interactive packet manipulation program
...Scapy can be used as a REPL or as a library. It provides all the tools and documentation to quickly add custom network layers. Scapy runs natively on Linux, macOS, most Unixes, and on Windows with Npcap. It is published under GPLv2. Starting from version 2.5.0+, it supports Python 3.7+ (and PyPy). Scapy supports Python 2.7 and Python 3 (3.4 to 3.9). It's intended to be cross platform, and runs on many different platforms (Linux, OSX, *BSD, and Windows). Scapy can easily be used as an interactive shell to interact with the network. ...