Linux tool to send raw data to a TCP server Linux tool to send raw data to a TCP server linux linux

Linux tool to send raw data to a TCP server


From bash with dd:

dd if=/dev/zero bs=9000 count=1000 > /dev/tcp/$target_host/$port

or even with cat:

cat < /dev/urandom > /dev/tcp/$target_host/$port


netcat or telnet, i have used both in the past to test simple text based protocols. netcat is more flexible.


Sounds like Expect may be what you want. There are implementations for multiple scripting languages, and you can script the requests/server responses plus appropriate timeouts, error handling etc.