Nmap Development mailing list archives

Re: Pcre Binding


From: Patrick Donnelly <batrick () batbytes com>
Date: Fri, 11 Jul 2014 15:37:50 -0400

Hi nnposter,

On Fri, Jul 11, 2014 at 2:51 PM,  <nnposter () users sourceforge net> wrote:
devin bjelland wrote:
Since no scripts are still using the Pcre binding, and Lpeg does everything
it does, I propose removing the NSE binding for Pcre. I'm interested to
know what people think of this (i.e. do you have some secret super awesome
thing that you use the Pcre binding for).

The PCRE/lpeg conversion broke telnet-brute.nse. A cursory look at the
script code shows that some unwarranted liberties were taken when
re-inventing the match patterns.

I'm responsible for most of the conversions from PCRE to LPeg.
telnet-brute was the only difficult script to convert. This is largely
because it uses some peculiar patterns like \b (word boundary) and
some unnecessary/obscure capture options (?). I had to make a fix in
r33180 because I botched the patterns. I'm pretty sure they are
correct now and we have some simple asserts to verify subjects that
should match.

IMHO it is not appropriate to do so
unless the person can in fact validate that the patterns are still
working as expected. Put differently, either the new patterns should be
functionally equal or the legacy PCRE bindings should not be messed
with for the time being.

I would normally agree with this philosophy but because we have so
many scripts which are non-trivial to confirm actually work, I don't
feel this is a sensible way to think. If we weren't willing to make
some changes, we'd be stuck with a lot of legacy code and be hamstrung
in efforts to improve things.

-- 
Patrick Donnelly
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: