I used to use netcat for Windows to help track down network connectivity issues. However these days my anti-virus software (Symantec - but I understand others display similar behaviour) quarantines netcat.exe as malware.

Are there any alternative applications which provide at least the following functionality:

  • can connect to an open TCP socket and send data to it which is typed on the console
  • can open and listen on a TCP socket and print received data to the console

?

I don't need the 'advanced' features (which are possibly the reason for the quarantining) such as port scanning or remote execution.

link|improve this question

75% accept rate
feedback

4 Answers

The quick answer here is to use the built in Telnet program from the CMD command line.

the command is...

telnet hostname.domain.com 80

The above example will connect you to the hostname on port 80. you can use it on just about any port you need to check out. This is extremely handy for troubleshooting SMTP and ESMTP issues.

link|improve this answer
3  
Yes telnet is useful, but only solves half of the problem. – heavyd Jul 28 '09 at 15:43
This will only allow me to do the first of my bullet points, won't it? Also doesn't telnet expect some sort of handshake communication from the socket it connects to? – Matthew Murdoch Jul 28 '09 at 15:44
3  
You no longer have telnet on win vista. – Mercer Traieste Jul 28 '09 at 16:07
But you can install it, according to (for example) adamsdvds.co.uk/tutorials/vista/telnet/telnet.php... – Matthew Murdoch Jul 28 '09 at 16:23
AFAIK it does both. You can connect it to a port and look to see what the output is. I do this all the time. Connecting to the port also works like a champ. You can also run telnet from the command line by itself. This gets you to the telnet command line. You can tweak the setting to echo locally by typing "Set Localecho" – Axxmasterr Jul 28 '09 at 16:32
show 4 more comments
feedback

http://joncraton.org/blog/netcat-for-windows

This person ran into the exact same problem; read till the end for the version compiled without remote execution. I downloaded and extracted these on two systems running 'Symantec Endpoint Protection'. While the netcat on this page was removed and quarantined when run, the 'rodneybeede' version linked to near the end of the page tried to connect to the desired port, and wasn't quarantined.

link|improve this answer
feedback

Even if it seems otherwise, Wireshark is easy to use. You can setup it easily to listen to a specific port.

wireshark

Another tool is nmap which again, I find easy to use. It will tell you much about open ports on a remote machine, so you can use it troubleshoot connectivity issues. Just nmap www.google.com from command line, or from included gui interface.

nmap

nmap

Just give them a try.

link|improve this answer
Will these tools let me 'open and listen on a TCP socket and print received data to the console' (the second bullet point)? – Matthew Murdoch Jul 28 '09 at 16:17
1  
I've updated the answer with a screenshot of tcp capture from Wireshark. In 9 minutes i've downloaded it, installed it, started a capture, and gave it a screenshot. – Mercer Traieste Jul 28 '09 at 16:28
But isn't Wireshark capturing data sent between two already executing networked processes? I really want to be able to start up the application to listen on a port as a server (as I could with netcat) so that I can debug client applications. – Matthew Murdoch Jul 28 '09 at 16:48
1  
Wireshark will not allow you to communicate with the server you are connected to, nor will it listen on socket for incoming connnection. It is a packet capture tool, not quite what the OP is looking for. – heavyd Jul 28 '09 at 17:19
Will WireShark let me capture data between two processes running on the same machine? – Matthew Murdoch Jul 31 '09 at 8:35
feedback

Maybe... just tell norton AV this is not a virus?

link|improve this answer
Is this possible? – Matthew Murdoch Jul 28 '09 at 16:16
2  
Half-serious answer: Get rid of Norton. Serious answer: Look through the settings for "Exceptions". – grawity Jul 28 '09 at 16:37
1  
Sometimes you don't have control over the antivirus, especially in managed networks. – Dentrasi Mar 2 '10 at 15:05
+1: It does solve the problem and is a good answer for someone that has control over their AV software. – snmcdonald Feb 5 '11 at 23:14
feedback

Your Answer

 
or
required, but never shown

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