Skip to content

Inexact conversion from PCRE to LPEG in telnet-brute.nse #35

Closed

Description

@nnposter

Script telnet-brute.nse has not been working correctly against some targets, such as Cisco IOS, since it has been converted from PCRE to LPEG.

Details are available at http://seclists.org/nmap-dev/2014/q3/64

Activity

  1. dmiller-nmap commented on Jan 16, 2015

    @dmiller-nmap

    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.

  2. dmiller-nmap commented on Jan 16, 2015

    @dmiller-nmap

    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.

  3. self-assigned this
    on Jan 16, 2015
  4. nnposter commented on Feb 1, 2015

    @nnposter
    Author

    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

  5. added this to the milestone on May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions