Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running script - NSE: failed to initialize the script engine #1

Open
ds2k5 opened this issue May 30, 2017 · 3 comments
Open

Comments

@ds2k5
Copy link

ds2k5 commented May 30, 2017

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

@jmshh
Copy link

jmshh commented Jul 21, 2017

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")

@hktalent
Copy link

/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

@lavenderblues9
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants