Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: fingerprint submitter should strip whitespace
From: Fyodor <fyodor () insecure org>
Date: Fri, 24 Apr 2009 16:30:47 -0700

On Fri, Apr 24, 2009 at 05:23:14PM -0600, David Fifield wrote:
On Fri, Apr 24, 2009 at 03:39:59PM -0700, Fyodor wrote:
On Fri, Apr 24, 2009 at 10:55:18AM +0200, Hans Meine wrote:

I was trying the same thing. I only got the red text when I put extra
whitespace at the end of the first line. It didn't happen on any of the
other lines, as far as I could tell.

You're right--I can now reproduce it.  I checked in (and uploaded to
the site) a fix which seems to be working:

--- submit-core.js      (revision 13062)
+++ submit-core.js      (working copy)
@@ -160,12 +160,12 @@
 var empty_re = new RegExp("^$");
-var os_start_re = new RegExp("^[\r\n\t ]*OS:SCAN.V=[^\r\n\t ]+\r?\n");
+var os_start_re = new RegExp("^[\r\n\t ]*OS:SCAN.V=[^\r\n\t ]+[\t ]*\r?\n");
 var os_end_re = new RegExp("OS:[^\r\n\t ]+?[\r\n\t ]*$");
 var os_unacceptable_re = new RegExp("%G=N%");
 var os_has_xml_newlines_re = new RegExp("&#xa;");
-var sv_start_re = new RegExp("^[\r\n\t ]*SF-Port[^\r\n\t ]+\r?\nSF:");
+var sv_start_re = new RegExp("^[\r\n\t ]*SF-Port[^\r\n\t ]+[\t ]*\r?\nSF:");
 var sv_end_re = new RegExp("SF:[^\r\n\t ]+?[\r\n\t ]*$");
 var sv_mult_re = new RegExp("===NEXT SERVICE FINGERPRINT");

Note that you may need to do a hard reload (shift-cntrl-r on my
Firefox) to see the change due to Javascript caching in browsers.


Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]