db_nmap
db_nmap copied to clipboard
Preserve values set by environment when options are not set in Metasploit config
The changes in https://github.com/jojonas/db_nmap/commit/5bf052a2183a337890ee80b21c029d1495be38bd assume that all config options are set in the metasploit yaml file.
If a config option is not set, Metasploit will fallback to the values set in the environment variables.
In db_nmap, if a value is not set, it will be read as the empty string (or 0 in the case of port).
This commit checks if the config options are actually used before overriding the defaults.