Nmap Development mailing list archives
Re: LUA "Invalid Escape Sequence" error with NMAP 6.25
From: Aaron Giuoco <afxdub () gmail com>
Date: Sat, 15 Dec 2012 11:34:30 -0600
Henri, Thanks for taking a look. I made the changes you suggested (require "stdnse", declare 'ret', declare *action functions) and I still get the same result. I don't think the file is corrupted because it works with 6.01. The error makes me think that I'm not properly escaping a character somewhere. I am running this on Win7 if that makes a difference. I probably need to try it in Linux to make sure I'm getting the same error and it's not some weird OS specific problem. AG On Dec 15, 2012 10:55 AM, "Henri Doreau" <henri.doreau () gmail com> wrote:
2012/12/15 Aaron Giuoco <afxdub () gmail com>:Hi everyone, I hope you can point me in the right direction. I have a custom NSEscriptthat is throwing the error below in NMAP 6.25. The script worked fine in 6.01. I'm sure that I just need to make some adjustments because of the Lua upgrade, but I don't know what is wrong. Script is attached. Starting Nmap 6.25 ( http://nmap.org ) at 2012-12-15 08:40 CentralStandardTime 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!Hello, I gave a quick try at your script against latest SVN version. I can't reproduce the bug you described but got two other ones. You first need to import stdnse (local stdnse = require "stdnse") and the 'ret' variable (in function portaction) should be declared as local. You might want (need?) to declare you *action functions as local too. I don't have wkhtmltoimage installed, so I can't test it furter but with the fixes above things seem to run smoothly. Is the file you sent exactly the one you're trying to run? Could it be that it's corrupted or something? Regards -- Henri
_______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- LUA "Invalid Escape Sequence" error with NMAP 6.25 Aaron Giuoco (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Henri Doreau (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Aaron Giuoco (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Henri Doreau (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Aaron Giuoco (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Aaron Giuoco (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Aaron Giuoco (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Henri Doreau (Dec 15)
- Re: LUA "Invalid Escape Sequence" error with NMAP 6.25 Aaron Giuoco (Dec 15)