1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-08 07:29:03 +00:00

Skip privileged pings against localhost on Windows.

Compare to this similar test in Nmap's scan_engine.cc:
  if (scantype != CONNECT_SCAN && Targets[0]->ifType() == devt_loopback) {
    log_write(LOG_STDOUT, "Skipping %s against %s because Windows does not support scanning your own machine (localhost) this way.\n", scantype2str(scantype), Targets[0]->NameIP());
    return;
  }

rndbit made a report--unfortunately we con't fix it, but we can make the
error message clearer.
http://seclists.org/nmap-dev/2013/q1/187
This commit is contained in:
david
2013-02-09 19:08:05 +00:00
parent 66bd9d1993
commit ecb16767e8
2 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*-
o [Nping] Nping now skips localhost targets for privileged pings (with
an error message) because those generally don't work.
[David Fifield]
o [Ncat] Ncat now keeps running in connect mode after receiving EOF
from the remote socket, unless --recv-only is in effect.
[Tomas Hozza]

View File

@@ -277,7 +277,13 @@ int NpingTargets::processSpecs(){
delete mytarget;
continue;
}
#ifdef WIN32
if (rnfo.ii.device_type == devt_loopback){
outError(QT_2, "Skipping %s because Windows does not allow localhost scans (try --unprivileged).", mytarget->getTargetIPstr() );
delete mytarget;
continue;
}
#endif
/* Determine next hop */
if( rnfo.direct_connect ){
mytarget->setDirectlyConnected(true);