Nmap Development mailing list archives
Re: [nmap-svn] r18902 - nmap
From: David Fifield <david () bamsoftware com>
Date: Sat, 17 Jul 2010 08:52:17 -0600
On Sat, Jul 17, 2010 at 08:04:16AM -0400, Patrick Donnelly wrote:
On Sat, Jul 17, 2010 at 7:59 AM, <commit-mailer () insecure org> wrote:Author: batrick Date: Sat Jul 17 04:59:04 2010 New Revision: 18902 Log: Clean up code. Fix port.version.service_fp not getting set properly. Added field service_dtype (which was replacing service_fp) to version table. Modified: nmap/nse_nmaplib.ccIn addition to cleaning up this code there appears to be an error where the port.version.service_fp was being replaced with what I think was supposed to be a service_dtype field: - SCRIPT_ENGINE_PUSHSTRING_NOTNULL(sd->service_fp, "service_fp"); - - switch(sd->dtype) { - case(SERVICE_DETECTION_TABLE): - SCRIPT_ENGINE_PUSHSTRING_NOTNULL("table", "service_fp"); - break; - case(SERVICE_DETECTION_PROBED): - SCRIPT_ENGINE_PUSHSTRING_NOTNULL("probed", "service_fp"); - break; - default: - fatal("%s: In: %s:%i This should never happen.", - SCRIPT_ENGINE, __FILE__, __LINE__); - break; - } As you can see, the first set to the "service_fp" field is always replaced by this sd->dtype value. I went ahead and added a "service_dtype" field instead. I will document this change assuming no one has a problem with it.
That looks fine. I was going to suggest calling it just "dtype" instead of "service_dtype", because the other fields match their C struct names. But on reflection I think that doesn't matter so much. How about calling it "method", which matches the attribute in XML output? <service name="X11" method="table" conf="3"/> David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [nmap-svn] r18902 - nmap Patrick Donnelly (Jul 17)
- Re: [nmap-svn] r18902 - nmap Patrick Donnelly (Jul 17)
- Re: [nmap-svn] r18902 - nmap David Fifield (Jul 17)