Netcat Linux

jaxrpc
jaxrpc used Ask the Experts™
on
Hi,

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

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

-10%START%-10HERE_IS_SOME_DATA...................-20%END%-20

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

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009
Commented:
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.

Commented:
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