How do I make ncat not send a line-feed?

Posted by tladuke on Server Fault See other posts from Server Fault or by tladuke
Published on 2012-07-20T02:10:20Z Indexed on 2014/06/10 3:29 UTC
Read the original article Hit count: 449

Filed under:
|

I'm on Windows 7 Powershell and have ncat from http://nmap.org/ncat/

I'm trying to send "foo" to some network device

PS> ncat -u 192.168.1.255 6061
foo

but it sends "foo\n" (66 6f 6f 0a) and the line-feed makes the device not recognize the command.

there's a -C option to add a carriage return, but that's no help.

I made a text file containing "foo" and did

PS> cat .\test.txt | ncat -u 192.168.1.255 6061

but that also adds CRLF

© Server Fault or respective owner

Related posts about powershell

Related posts about netcat