Nmap Development mailing list archives

Problem using ~/.nmap/nselib/


From: Daniel Miller <bonsaiviking () gmail com>
Date: Mon, 19 Sep 2011 17:37:12 -0500

Hey list,

I was trying to use the per-user Nmap directory ~/.nmap to test a library, and I found that, unlike with scripts, Nmap only supports one nselib directory. It will happily use ~/.nmap/nselib, or $NMAPDIR/nselib, but will complain that every other NSE library cannot be found. Here is the error as I see it:

Starting Nmap 5.59BETA3 ( http://nmap.org ) at 2011-09-19 17:24 CDT
Warning: File ./nselib/ exists, but Nmap is using /home/miller/.nmap/nselib/ for security and consistency reasons. set NMAPDIR=. to give priority to files in your local directory (may affect the other data files too).
NSE: failed to initialize the script engine:
/usr/local/bin/../share/nmap/nse_main.lua:131: module 'stdnse' not found:
    no field package.preload['stdnse']
    no file '/home/miller/.nmap/nselib/stdnse.lua'
    no file './stdnse.lua'
    no file '/usr/local/share/lua/5.1/stdnse.lua'
    no file '/usr/local/share/lua/5.1/stdnse/init.lua'
    no file '/usr/local/lib/lua/5.1/stdnse.lua'
    no file '/usr/local/lib/lua/5.1/stdnse/init.lua'
    no file '/usr/share/lua/5.1/stdnse.lua'
    no file '/usr/share/lua/5.1/stdnse/init.lua'
    no file './stdnse.so'
    no file '/usr/local/lib/lua/5.1/stdnse.so'
    no file '/usr/lib/lua/5.1/stdnse.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
    [C]: in function 'require'
    /usr/local/bin/../share/nmap/nse_main.lua:131: in main chunk
    [C]: ?

QUITTING!

Is there a good reason for doing it this way, or should I spend the time to hunt this down and add the proper locations to the package.path? Or has someone already looked at this?

Dan


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: