vulnersCom/nmap-vulners

Nmap Script Error

therzv opened this issue · 6 comments

/usr/bin/../share/nmap/nse_main.lua:259: /usr/bin/../share/nmap/scripts/vulners.nse:1: unexpected symbol near '<'
stack traceback:
[C]: in function 'assert'
/usr/bin/../share/nmap/nse_main.lua:259: in upvalue 'loadscript'
/usr/bin/../share/nmap/nse_main.lua:601: in field 'new'
/usr/bin/../share/nmap/nse_main.lua:825: in local 'get_chosen_scripts'
/usr/bin/../share/nmap/nse_main.lua:1312: in main chunk
[C]: in ?

Hi.

When do you get such an error? It's kind strange as there is no such symbol in the whole script apart from a comment.

i just :
cd /usr/share/nmap/scripts/
wget https://github.com/vulnersCom/nmap-vulners/blob/master/vulners.nse

then i run

nmap host.com --script=vulners

and i got those error message

Please take a closer look at what you have downloaded:

using wget you get not the script, but an HTML page from github

just clone the repo, or use "Download as zip" feature of github.

Moreover, note that to use the script in a proper way you need to use -sV option. Please refer to the README in the repository.

curl -ksL https://raw.githubusercontent.com/vulnersCom/nmap-vulners/master/vulners.nse >> /usr/share/nmap/scripts/vulners.nse && chmod 0644 /usr/share/nmap/scripts/vulners.nse

you cant just wget the non-raw version and expect it to not grab the html too

you will have to run the following commands in sequence thats what worked for me

curl -ksL https://raw.githubusercontent.com/vulnersCom/nmap-vulners/master/vulners.nse >> /usr/share/nmap/scripts/vulners.nse && chmod 0644 /usr/share/nmap/scripts/vulners.nse
nmap --script-updatedb

Run nmap

Above mentioned solutions are not working for me.