Nmap Development mailing list archives

Re: Dash in character set issue with ~400 lines of nmap-service-probes


From: Fyodor <fyodor () insecure org>
Date: Tue, 19 Feb 2008 11:05:47 -0800

On Tue, Feb 19, 2008 at 01:39:25PM -0500, William Stearns wrote:
Good afternoon, fyodor, all,
      Thank you all for your work on nmap.  *sincere smile*

Thanks, I'm glad you find it useful!

      While I was parsing nmap-service-probes in python (*), about 400 
of the match strings were rejected by python's regex compiler.  I took a 
few minutes to see why; all were related to the "-" character in character 
sets, such as "[\w\d-_]".

Well, we use Perl-style regular expressions.  Perl (and LibPCRE, which
we use) seem to allow a hyphen after a character class like \w in a
character set.  But I agree that putting them at the beginning or end
would be better.  So if you want to check out the latest
nmap-service-probes from SNV
(http://nmap.org/install/index.html#inst-svn) and make the changes,
and do some quick testing to make sure nothing was inadvertantly
broken, I'd be happy to apply them.

Keep in mind that Python may not support other Perl extensions used in
nmap-service-probes regexps.  I don't know anything about how Python
does regular expresions.

Cheers,
-F

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


Current thread: