Netcat Linux

jaxrpc used Ask the Experts™

I am trying to use netcat in linux as a tcp client to send some messages to a server.
The message is in this format

The start of the message is a 9 signed byte and followed by 256 bytes of data and ends with a 7 signed byte  


How do i send such a message containing signed byte -10 using netcat?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009
Traditionally, netcat did not have any special code to handle binary sequences, so you need to edit your own binary file, then pipe it to netcat. netcat is meant to act like cat as much as possible.

Like the first poster said, it's simple shell redirection.  Basically, craft the packet, and pipe it through netcat.  You can use perl, shell, or virtually any other programming/scripting language to craft the packet, but that's on you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial