1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-28 00:59:04 +00:00

Adding support for NSE + Ping Scan (-sP) for executing host scripts. So "-sPC", "-sP --script all" and "-sP --script ripeQuery" all work correctly

This commit is contained in:
kris
2008-07-03 04:11:42 +00:00
parent ca54802de6
commit d0a2ec9d50
3 changed files with 6 additions and 1 deletions

View File

@@ -8,6 +8,8 @@ o Fixed the "resolution errors not showing up" bug. Actually, from now
stderr is also redirected there (until now, only stdout was
displayed). [Vladimir]
o NSE now works with the Ping Scan (-sP) to execute host scripts. [Kris]
Nmap 4.68 [2008-6-28]
o Doug integrated all of your version detection submissions and

View File

@@ -1622,7 +1622,7 @@ int nmap_main(int argc, char *argv[]) {
if (currenths->flags & HOST_UP && !o.listscan)
o.numhosts_up++;
if ((o.pingscan && !o.traceroute) || o.listscan) {
if ((o.pingscan && !o.traceroute && !o.script) || o.listscan) {
/* We're done with the hosts */
log_write(LOG_XML, "<host>");
write_host_status(currenths, o.resolve_all);

View File

@@ -509,6 +509,9 @@ void printportoutput(Target *currenths, PortList *plist) {
vector<const char *> saved_servicefps;
if (o.pingscan)
return;
log_write(LOG_XML, "<ports>");
int prevstate = PORT_UNKNOWN;
int istate;