First, I thought that this was Vmware problem.

But now, after testing on several physical machines, I realized certain services didn't return response data when using socat/netcat 1.1 which is supposed to the latest version since last updated.

root@test3:~# netcat 192.168.1.2 25
220 762462a8c4d Microsoft ESMTP MAIL
Service, Version: 6.0.2600.5949 ready
at  Fri, 12 May 2010 18:04:20 +0600


EHLO localhost

sdfsafsd

^

root@test3:~# 

I've tested it on both windows and linuxes. I found no problem with telnet.

link|improve this question

0% accept rate
Hi, cpbills, sorry for the output. Those are in wrong format when pasting. Just banner. >220 762462a8c4d Microsoft ESMTP MAIL Service, Version: 6.0.2600.5949 ready at T ue, 18 May 2010 08:08:13 So there any ways to type LF in nc in Windows command prompt? – jack May 18 '10 at 3:59
Update: There is no way to type LF in nc in Windows command prompt. – jack Jun 4 '10 at 6:18
If your question is answered, you should accept answer instead of adding it to topic. – Olli Mar 30 '11 at 17:47
feedback

2 Answers

Windows and it's services like to have a line-feed (LR) accompanying any carriage-returns (CR). Your shell won't generate the LF automatically. As a result of this, in your example, no commands would have been submitted to the receiving server.

You can insert an LR manually alongside your CR by typing Ctrl+v, Enter, Enter at the end of each line. It will be displayed as ^M and then a newline. Then you should receive the relevant responses from the server.

If you're using OpenSSL's s_client for talking to SSL services then you can use the argument -crlf to do it automagically for you.

link|improve this answer
Thanks, Dan Carley. I was forgetting this point. I was insisting on thinking I get used to get outputs just by pressing "Enter". Ctrl+v,ENTER,Enter works at Linux but what about Windows? Many thanks ! – jack May 17 '10 at 18:31
feedback

are you sure you don't need to run the command like netcat 192.168.1.2 25 and then type EHLO ?

from your question, it looks like you're typing your command as netcat 192.168.1.2 25 220 762462a8c4d Microsoft ESMTP MAIL Service, Version: 6.0.2600.5949 ready at Fri, 12 May 2010 18:04:20 +0800 EHLO SAYHELLO VRFY TEST@LOCALHOST and not netcat 192.168.1.2 25

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.