Open ds2k5 opened 7 years ago
I had the same problem. My error was: I copied the file from this side - therefore it was in html-format (First lines empty). You have to save it as plain test (First line: local nmap = require "nmap")
/tmp#lua -v
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
/tmp#luac -v
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
/tmp#nmap --min-hostgroup 96 -p 1-65535 -n -T4 -A -v -oX lf.xml 192.168.1.1/24
Starting Nmap 7.70 ( https://nmap.org ) at 2018-11-18 16:55 CST
NSE: failed to initialize the script engine:
/usr/bin/../share/nmap/nse_main.lua:821: 'version' did not match a category, filename, or directory
stack traceback:
[C]: in function 'error'
/usr/bin/../share/nmap/nse_main.lua:821: in local 'get_chosen_scripts'
/usr/bin/../sh
@ds2k5 @jmshh @Waffles-2
Hi, Can anyone help me with this?
I have a similar problem, I'm new to VAPT and I'm using GUI for windows, this is what I got when I used this script from nmap online guide [nmap -p 80 --script http-default-accounts.routers xx.xx.xx.xx]. I borrowed the script from here : https://nmap.org/nsedoc/scripts/http-default-accounts.html
Nmap output begins below this line:
NSE: failed to initialize the script engine:
C:\Program Files (x86)\Nmap/nse_main.lua:823: 'http-default-accounts.category' did not match a category, filename, or directory
stack traceback:
[C]: in function 'error'
C:\Program Files (x86)\Nmap/nse_main.lua:823: in local 'get_chosen_scripts'
C:\Program Files (x86)\Nmap/nse_main.lua:1315: in main chunk
[C]: in ?
QUITTING!
Hi at ALL, I got this error while running the script.
$ nmap --script=CVE-2017-7494.nse
Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-30 06:56 CEST NSE: failed to initialize the script engine: /usr/bin/../share/nmap/nse_main.lua:255: /usr/bin/../share/nmap/scripts/CVE-2017-7494.nse:7: unexpected symbol near '<' stack traceback: [C]: in function 'assert' /usr/bin/../share/nmap/nse_main.lua:255: in upvalue 'loadscript' /usr/bin/../share/nmap/nse_main.lua:597: in field 'new' /usr/bin/../share/nmap/nse_main.lua:820: in local 'get_chosen_scripts' /usr/bin/../share/nmap/nse_main.lua:1271: in main chunk [C]: in ?
QUITTING!
$ lua -v Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
How to fix this ?
Here the nse_main script:
nse_main.zip
Thanks