You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inexact conversion from PCRE to LPEG in telnet-brute.nse #35
Thanks for the report; I'm currently looking at this. Do you have an example of an input that should match, and the line number where it should match? This would help in modifying the LPEG patterns, since all I have to go on right now is the previous PCRE.
It looks like this is probably related to anchoring. The patterns produced by re.compile are all anchored to the beginning, as though they began with '^'. There also doesn't seem to be a way to anchor to the end ('$'). These are easy enough things to overcome with lpeg-utility.anywhere and lpeg.P(-1), so I'll give that a go. I'm also updating the test assertions to involve more realistic prompts, so if you have suggestions for those, I'll take them.
Activity
dmiller-nmap commentedon Jan 16, 2015
Thanks for the report; I'm currently looking at this. Do you have an example of an input that should match, and the line number where it should match? This would help in modifying the LPEG patterns, since all I have to go on right now is the previous PCRE.
dmiller-nmap commentedon Jan 16, 2015
It looks like this is probably related to anchoring. The patterns produced by
re.compileare all anchored to the beginning, as though they began with '^'. There also doesn't seem to be a way to anchor to the end ('$'). These are easy enough things to overcome withlpeg-utility.anywhereandlpeg.P(-1), so I'll give that a go. I'm also updating the test assertions to involve more realistic prompts, so if you have suggestions for those, I'll take them.dmiller-nmap commentedon Jan 16, 2015
@nnposter Please try the patch at https://gist.github.com/dmiller-nmap/7bb236c7d3c864167288 (also sending to nmap-dev)
nnposter commentedon Feb 1, 2015
I have created a counter-proposal to use native Lua patterns instead of LPEG. The latter seems a little too complicated for this task.
http://seclists.org/nmap-dev/2015/q1/112