Nmap Development mailing list archives
Patch to improve error messages
From: Richard Moore <rich () westpoint ltd uk>
Date: Wed, 09 Feb 2005 14:48:11 +0000
When strange errnos are received during connect scans, nmap currently just displays it's own message and the errno of the system message. This patch makes it display the string version of the system message too, like this: Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-02-09 14:44 GMTStrange SO_ERROR from connection to 192.168.4.1 (101 - 'Network is unreachable') -- bailing scan : Operation now in progress
The patch is against nmap 3.81. Cheers Rich. -- Richard Moore, Principle Software Engineer, Westpoint Ltd, Albion Wharf, 19 Albion Street, Manchester, M1 5LN, England Tel: +44 161 237 1028 Fax: +44 161 237 1031
*** scan_engine.cc 2005-02-05 07:51:37.000000000 +0000 --- ../xx/nmap-3.81/scan_engine.cc 2005-02-09 14:38:29.000000000 +0000 *************** *** 2176,2186 **** case ENETUNREACH: case ENETRESET: case ECONNABORTED: ! snprintf(buf, sizeof(buf), "Strange SO_ERROR from connection to %s (%d) -- bailing scan", host->target->targetipstr(), optval); pfatal(buf); break; default: ! snprintf(buf, sizeof(buf), "Strange read error from %s (%d)", host->target->targetipstr(), optval); perror(buf); break; } --- 2176,2186 ---- case ENETUNREACH: case ENETRESET: case ECONNABORTED: ! snprintf(buf, sizeof(buf), "Strange SO_ERROR from connection to %s (%d - '%s') -- bailing scan", host->target->targetipstr(), optval, strerror(optval) ); pfatal(buf); break; default: ! snprintf(buf, sizeof(buf), "Strange read error from %s (%d - '%s')", host->target->targetipstr(), optval, strerror(optval)); perror(buf); break; }
--------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List archive: http://seclists.org
Current thread:
- Patch to improve error messages Richard Moore (Feb 09)