mirror of
https://github.com/nmap/nmap.git
synced 2025-12-21 15:09:02 +00:00
If neither --script nor -sV is present, then do not load NSE. Before, NSE
would load despite script scanning not being activated. See [1] for preliminary patch from Solar Designer and motivation. [1] http://seclists.org/nmap-dev/2009/q3/0207.html
This commit is contained in:
6
nmap.cc
6
nmap.cc
@@ -1681,7 +1681,8 @@ int nmap_main(int argc, char *argv[]) {
|
||||
}
|
||||
if (o.servicescan)
|
||||
o.scriptversion = 1;
|
||||
open_nse();
|
||||
if (o.scriptversion || o.script)
|
||||
open_nse();
|
||||
#endif
|
||||
|
||||
/* Time to create a hostgroup state object filled with all the requested
|
||||
@@ -2017,7 +2018,8 @@ void nmap_free_mem() {
|
||||
if (o.extra_payload) free(o.extra_payload);
|
||||
if (o.ipoptions) free(o.ipoptions);
|
||||
#ifndef NOLUA
|
||||
close_nse();
|
||||
if (o.scriptversion || o.script)
|
||||
close_nse();
|
||||
free(o.scriptargs);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user