Nmap Development mailing list archives

Bug/Enhancement (ncat/nsock) - Recognize Winsock error codes


From: Paul Milliken <pmilliken () gmail com>
Date: Thu, 19 Nov 2009 11:33:24 +0000

Hi,

I've noticed that ncat doesn't interpret Windows Socket errors,
instead displaying them as "Unknown error". Contrast the following
outputs from Windows and Linux respectively:

C:\tools\nmap-5.00>ncat -v -v -v 10.10.130.140 8888
Ncat version 5.00 ( http://nmap.org/ncat )
NSOCK (0.0620s) TCP connection requested to 10.10.130.140:8888 (IOD #1) EID 8
NSOCK (1.0160s) Callback: CONNECT ERROR [Unknown error (10061)] for
EID 8 [10.10.130.140:8888]
DEBUG: Received callback of type CONNECT with status ERROR

[paul.milliken@balamb ~]$ ncat -v -v -v 10.10.130.140 8888
Ncat version 5.00 ( http://nmap.org/ncat )
NSOCK (0.0020s) TCP connection requested to 10.10.130.140:8888 (IOD #1) EID 8
NSOCK (0.0020s) Callback: CONNECT ERROR [Connection refused (111)] for
EID 8 [10.10.130.140:8888]
DEBUG: Received callback of type CONNECT with status ERROR
Connection refused.

According to MSDN, error code 10061 does indicate connection refused.
It would more convenient if ncat interpreted the errors on Windows,
especially when attempting to use it to diagnose connection issues.

(Not sure if it's relavent, but the Windows machine is running XP SP3).

Thanks,

Paul Milliken
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: