CVEScannerV2 icon indicating copy to clipboard operation
CVEScannerV2 copied to clipboard

cvescannerv2.nse:73: module 'luasql.sqlite3' not found:

Open Mayur021 opened this issue 1 year ago • 5 comments

NSE: Failed to load cvescannerv2.nse: cvescannerv2.nse:73: module 'luasql.sqlite3' not found:

    NSE failed to find nselib/luasql/sqlite3.lua in search paths.
    no field package.preload['luasql.sqlite3']
    no file '/usr/local/share/lua/5.4/luasql/sqlite3.lua'
    no file '/usr/local/share/lua/5.4/luasql/sqlite3/init.lua'
    no file '/usr/local/lib/lua/5.4/luasql/sqlite3.lua'
    no file '/usr/local/lib/lua/5.4/luasql/sqlite3/init.lua'
    no file '/usr/share/lua/5.4/luasql/sqlite3.lua'
    no file '/usr/share/lua/5.4/luasql/sqlite3/init.lua'
    no file './luasql/sqlite3.lua'
    no file './luasql/sqlite3/init.lua'
    no file '/usr/local/lib/lua/5.4/luasql/sqlite3.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.4/luasql/sqlite3.so'
    no file '/usr/lib/lua/5.4/luasql/sqlite3.so'
    no file '/usr/local/lib/lua/5.4/loadall.so'
    no file './luasql/sqlite3.so'
    no file '/usr/local/lib/lua/5.4/luasql.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.4/luasql.so'
    no file '/usr/lib/lua/5.4/luasql.so'
    no file '/usr/local/lib/lua/5.4/loadall.so'
    no file './luasql.so'

stack traceback: [C]: in function 'require' cvescannerv2.nse:73: in function cvescannerv2.nse:1 NSE: failed to initialize the script engine: /usr/bin/../share/nmap/nse_main.lua:636: could not load script stack traceback: [C]: in function 'error' /usr/bin/../share/nmap/nse_main.lua:636: in field 'new' /usr/bin/../share/nmap/nse_main.lua:836: in local 'get_chosen_scripts' /usr/bin/../share/nmap/nse_main.lua:1364: in main chunk [C]: in ?

QUITTING!

Not able to remediate this error I already follow all steps symbolic links and all I'm using wsl kali-linux I manually try to install via luarocks too but not get success.

Mayur021 avatar Sep 16 '24 10:09 Mayur021

Can you check the output from ls -l /usr/lib/x86_64-linux-gnu/lua? Or even ls -l /usr/lib

scmanjarrez avatar Sep 16 '24 11:09 scmanjarrez

ls -l /usr/lib/x86_64-linux-gnu/lua total 16 drwxr-xr-x 5 root root 4096 Sep 16 17:38 5.1 drwxr-xr-x 4 root root 4096 Sep 16 12:42 5.2 drwxr-xr-x 4 root root 4096 Sep 16 12:42 5.3 drwxr-xr-x 5 root root 4096 Sep 16 17:48 5.4 lrwxrwxrwx 1 root root 12 Sep 16 13:43 lua -> /usr/lib/lua lrwxrwxrwx 1 root root 29 Sep 16 16:42 luasql -> /usr/local/lib/lua/5.1/luasql

Mayur021 avatar Sep 16 '24 12:09 Mayur021

Your system seems to be running Lua 5.1, but your nmap requires Lua 5.4. Have you tested the container? It already has the dependencies installed, and you can use it as if the script were installed on your host

scmanjarrez avatar Sep 16 '24 12:09 scmanjarrez

I didn't use a container let me check and update you Please test it with Nmap Lua 5.4. actually, I checked so lusql-sqlite3 not supported in lua5.4 it's helpful if it's works as I already used your scannerV1 and it works fine with Nmap lua5.4

Mayur021 avatar Sep 17 '24 07:09 Mayur021

Sorry, I didn't understand your message. In the above logs I can see that your system is using lua5.1, but your nmap expects lua5.4. Can you check the output of ls -l /usr/lib/x86_64-linux-gnu/lua/5.4?

scmanjarrez avatar Sep 20 '24 07:09 scmanjarrez