...
You can use python scampy http://www.secdev.org/projects/scapy/ for packet mangling or crafting.
Netcat is nice as well.
http://help.ubidots.com/developer-guides/sending-tcpudp-packets-using-netcat
Looks like socat is an option. Looks very netcat like
https://discourse.criticalengineering.org/t/howto-crafting-arbitrary-network-packets-with-socat/51