diff options
author | eik <eik@FreeBSD.org> | 2004-06-17 19:56:03 +0800 |
---|---|---|
committer | eik <eik@FreeBSD.org> | 2004-06-17 19:56:03 +0800 |
commit | 957cd740a14456f35eaca727cf567166a84b9316 (patch) | |
tree | b50068c233d74e8c2ec48660ce5b873dc2ea2496 | |
parent | 5ba321b01305a47985018838b342e817be66e030 (diff) | |
download | freebsd-ports-graphics-957cd740a14456f35eaca727cf567166a84b9316.tar.gz freebsd-ports-graphics-957cd740a14456f35eaca727cf567166a84b9316.tar.zst freebsd-ports-graphics-957cd740a14456f35eaca727cf567166a84b9316.zip |
- update to 3.51-TEST3
- fix bug when ranges cross interface boundaries [1]
Notified by: Alex Povolotsky <tarkhil@webmail.sub.ru>, Mike Benjamin <mikeb@mikeb.org> [1]
-rw-r--r-- | security/nmap/Makefile | 6 | ||||
-rw-r--r-- | security/nmap/distinfo | 4 | ||||
-rw-r--r-- | security/nmap/files/patch-targets.cc | 49 | ||||
-rw-r--r-- | security/nmap/files/patch-tcpip.cc | 20 | ||||
-rw-r--r-- | security/nmap/pkg-plist | 1 |
5 files changed, 76 insertions, 4 deletions
diff --git a/security/nmap/Makefile b/security/nmap/Makefile index 350367b4d7d..14652064be5 100644 --- a/security/nmap/Makefile +++ b/security/nmap/Makefile @@ -6,15 +6,17 @@ # PORTNAME?= nmap -PORTVERSION= 3.50 +PORTVERSION= ${DISTVERSION:L:C/([a-z])[a-z]+/\1/g:C/[^a-z0-9+]+/./g} CATEGORIES= security ipv6 MASTER_SITES= http://download.insecure.org/nmap/dist/ \ http://www.mirrors.wiretapped.net/security/network-mapping/nmap/ -DISTNAME= nmap-${PORTVERSION} # needed for security/nmapfe +DISTNAME= nmap-${DISTVERSION} # needed for security/nmapfe MAINTAINER= eik@FreeBSD.org COMMENT?= Port scanning utility for large networks +DISTVERSION= 3.51-TEST3 + USE_BZIP2= yes GNU_CONFIGURE= yes diff --git a/security/nmap/distinfo b/security/nmap/distinfo index c8e1a44322f..caea931f201 100644 --- a/security/nmap/distinfo +++ b/security/nmap/distinfo @@ -1,2 +1,2 @@ -MD5 (nmap-3.50.tar.bz2) = b4363f445a7c502cf314ae88ab71ec6c -SIZE (nmap-3.50.tar.bz2) = 1255501 +MD5 (nmap-3.51-TEST3.tar.bz2) = d49f83863011957c51b3173af7b5c58d +SIZE (nmap-3.51-TEST3.tar.bz2) = 1336757 diff --git a/security/nmap/files/patch-targets.cc b/security/nmap/files/patch-targets.cc new file mode 100644 index 00000000000..c74f69f8e0f --- /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 <device>"); + } 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++; + } + diff --git a/security/nmap/files/patch-tcpip.cc b/security/nmap/files/patch-tcpip.cc new file mode 100644 index 00000000000..a7ebe21da04 --- /dev/null +++ b/security/nmap/files/patch-tcpip.cc @@ -0,0 +1,20 @@ +--- tcpip.cc.orig Thu Jun 17 13:36:02 2004 ++++ tcpip.cc Thu Jun 17 13:38:54 2004 +@@ -1769,7 +1769,7 @@ + #if TCPIP_DEBUGGING + printf("ifnet list length = %d\n",ifc.ifc_len); + printf("sa_len = %d\n",len); +- hdump(buf, ifc.ifc_len); ++ hdump((unsigned char *)buf, ifc.ifc_len); + printf("ifr = %X\n",(unsigned int)(*(char **)&ifr)); + printf("Size of struct ifreq: %d\n", sizeof(struct ifreq)); + #endif +@@ -2214,7 +2214,7 @@ + error("sendto in %s: sendto(%d, packet, %d, 0, %s, %d) => %s", + functionname, sd, len, inet_ntoa(sin->sin_addr), tolen, + strerror(socket_errno())); +- if (retries > 2 || socket_errno() == EPERM) ++ if (retries > 2 || socket_errno() == EPERM || socket_errno() == EACCES || socket_errno() == EADDRNOTAVAIL) + return -1; + sleeptime = 15 * (1 << (2 * retries)); + error("Sleeping %d seconds then retrying", sleeptime); diff --git a/security/nmap/pkg-plist b/security/nmap/pkg-plist index ea5a433bf7a..5f3367d40b0 100644 --- a/security/nmap/pkg-plist +++ b/security/nmap/pkg-plist @@ -1,4 +1,5 @@ bin/nmap +%%DATADIR%%/nmap-mac-prefixes %%DATADIR%%/nmap-os-fingerprints %%DATADIR%%/nmap-protocols %%DATADIR%%/nmap-rpc |