Data directory search order

NSE will automatically attempt to retrieve data files from different sources, and the order of this search determines which files will be used when more than one data file source is available.

NSE will attempt to find the data files in the following order:

  • The script argument, --data-dir (if set)
  • The environment variable, NMAPDIR
  • The ~/.nmap directory of the running user (only on non-Windows systems)
  • The installation directory
  • The installation directory with ../share/nmap appended (only on non-Windows systems)
  • The location defined at compile time

Get Mastering the Nmap Scripting Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.