Spak - a collection of tools that can be used to generate and/or send arbitrary packets to a socket. Spak is designed to be very modular and allow as much control over the design of the packet as possible.
More Tools
Ipsend - packet generator from the ipfilter package
Ippacket - a command line/curses utility to construct IP/TCP/UDP/ICMP packets on a Linux system. (site down)
NetPacket - a bundle of modules disassemble nehtwork packets into a Perl hash for various Internet protocols. There are hooks for assembly of packets, but they have not been implemented in this version. At present, decoding for the following protocols has been implemented: Ethernet, ARP, ICMP, IGMP, IP, UDP, TCP.
Socket Script- made for people that want to create networking-oriented programs, but don't want to learn all the socket stuff. It has multiple network commands that enable you to tell the script interpreter where you want to connect, and all you have to do is focus on the script itself, leaving the connection parts to SScript.
tcpreplay - a tool to replay saved tcpdump files at arbitrary speeds. Many NIDSs fare poorly when looking for attacks on heavily-loaded networks. Tcpreplay allows you to recreate real network traffic from a real network for use in testing. Tcpreplay is fairly portable, relying on libpcap and libnet for packet capture and raw IP packet construction.