From 52667c5a80c7aee740eb8aeebd9112229ef7718f Mon Sep 17 00:00:00 2001 From: Oliver Eikemeier Date: Thu, 17 Jun 2004 11:56:03 +0000 Subject: - update to 3.51-TEST3 - fix bug when ranges cross interface boundaries [1] Notified by: Alex Povolotsky , Mike Benjamin [1] --- security/nmap/files/patch-targets.cc | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 security/nmap/files/patch-targets.cc (limited to 'security/nmap/files/patch-targets.cc') diff --git a/security/nmap/files/patch-targets.cc b/security/nmap/files/patch-targets.cc new file mode 100644 index 000000000000..c74f69f8e0f6 --- /dev/null +++ b/security/nmap/files/patch-targets.cc @@ -0,0 +1,49 @@ +--- targets.cc.orig Thu Jun 17 13:33:04 2004 ++++ targets.cc Thu Jun 17 13:34:44 2004 +@@ -259,16 +259,16 @@ + /* We figure out the source IP/device IFF + 1) We are r00t AND + 2) We are doing tcp or udp pingscan OR +- 3) We are doing a raw-mode portscan or osscan OR ++ 3) We are doing a raw-mode portscan or osscan OR + 4) We are on windows and doing ICMP ping */ + if (o.isr00t && o.af() == AF_INET && + ((*pingtype & (PINGTYPE_TCP|PINGTYPE_UDP)) || + o.synscan || o.finscan || o.xmasscan || o.nullscan || + o.ipprotscan || o.maimonscan || o.idlescan || o.ackscan || +- o.udpscan || o.osscan || o.windowscan +-#ifdef WIN32 +- || (*pingtype & (PINGTYPE_ICMP_PING|PINGTYPE_ICMP_MASK|PINGTYPE_ICMP_TS)) +-#endif // WIN32 ++ o.udpscan || o.osscan || o.windowscan ++#ifdef WIN32 ++ || (*pingtype & (PINGTYPE_ICMP_PING|PINGTYPE_ICMP_MASK|PINGTYPE_ICMP_TS)) ++#endif // WIN32 + )) { + struct sockaddr_in *sin = (struct sockaddr_in *) &ss; + sslen = sizeof(*sin); +@@ -279,14 +279,13 @@ + device = routethrough(hs->hostbatch[hidx]->v4hostip(), + &(sin->sin_addr)); + hs->hostbatch[hidx]->setSourceSockAddr(&ss, sslen); +- o.decoys[o.decoyturn] = hs->hostbatch[hidx]->v4source(); + if (!device) { + if (*pingtype == PINGTYPE_NONE) { + fatal("Could not determine what interface to route packets through, run again with -e "); + } else { +-#if WIN32 ++#if WIN32 + fatal("Unable to determine what interface to route packets through to %s", hs->hostbatch[hidx]->targetipstr()); +-#endif ++#endif + error("WARNING: Could not determine what interface to route packets through to %s, changing ping scantype to ICMP ping only", hs->hostbatch[hidx]->targetipstr()); + *pingtype = PINGTYPE_ICMP_PING; + } +@@ -305,6 +304,7 @@ + delete hs->hostbatch[hidx]; + goto batchfull; + } ++ o.decoys[o.decoyturn] = hs->hostbatch[hidx]->v4source(); + hs->current_batch_sz++; + } + -- cgit v1.2.3