Nmap Development mailing list archives

Re: LUA "Invalid Escape Sequence" error with NMAP 6.25


From: Patrick Donnelly <batrick () batbytes com>
Date: Sat, 15 Dec 2012 19:05:11 -0500

Hello Aaron,

On Sat, Dec 15, 2012 at 9:52 AM, Aaron Giuoco <afxdub () gmail com> wrote:
Starting Nmap 6.25 ( http://nmap.org ) at 2012-12-15 08:40 Central Standard
Time

NSE: failed to initialize the script engine:
nmap-6.25/nse_main.lua:659: Bad script rule:
        http-screenshot-html.nse ->  invalid escape sequence near '\U'
stack traceback:
        [C]: in function 'error'
        nmap-6.25/nse_main.lua:659: in function 'get_chosen_scripts'
        nmap-6.25/nse_main.lua:1239: in main chunk
        [C]: in ?

QUITTING!

This error is caused by what you pass to --script, not your
http-screenshot-html.nse script. I assume you did something like (and
sanitized the output you pasted?):

--script "C:\Users\aaron\http-screenshot-html.nse"

The problem is the Lua 5.2 interpreter does not allow strings to
contain unknown escape sequences, in this case '\U'. I don't think you
(the user) should need to escape these backslashes so I consider this
a bug. I have committed a fix in r30411. Please confirm if this
corrects the issue for you.

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


Current thread: