mailing list archives
[PATCH] NSE ipv4 checks
From: Henri Doreau <henri.doreau () greenbone net>
Date: Mon, 28 Mar 2011 22:52:41 +0200
2011/3/27 Djalal Harouni <tixxdz () opendz org>:
Speaking about NSE IPv6, there are some scripts which assume that they
are running in the IPv4 mode even if the '-6' option was specified. This
is buggy code.
Scripts that are using protocols which are available _only_ in one mode
IPv4 or IPv6, can call the nmap.address_family() function, check the
returned string 'inet' or 'inet6' and fail silently with a debug
Please find attached a patch that add such a check for several IPv4
only scripts. I have only checked and fixed scripts that perform "raw"
The patch also contains error messages standardization, replacing
nmap.log_write() with hardcoded script name by the more common
stdnse.print_debug() using the SCRIPT_NAME variable (as noticed in
The same scripts and functions are concerned by both modifications.
Henri Doreau | Greenbone Networks GmbH | http://www.greenbone.net
Neuer Graben 17, 49074 Osnabrueck, Germany | AG Osnabrueck, HR B 202460
Executive Directors: Lukas Grunwald, Dr. Jan-Oliver Wagner
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/
- [PATCH] NSE ipv4 checks Henri Doreau (Mar 28)