upgrade to nmap 3.48

--
From: MAINTAINER
New MAINTAINER: Dan Weeks <danimal at danimal dot org>
This commit is contained in:
brad 2003-12-09 18:42:36 +00:00
parent 6d25b60083
commit 1095737e47
12 changed files with 64 additions and 109 deletions

View File

@ -1,15 +1,15 @@
# $OpenBSD: Makefile,v 1.45 2002/11/22 19:03:56 cloder Exp $
# $OpenBSD: Makefile,v 1.46 2003/12/09 18:42:36 brad Exp $
COMMENT= "scan ports and fingerprint stack of network hosts"
DISTNAME= nmap-3.00
DISTNAME= nmap-3.48
CATEGORIES= net security
MASTER_SITES= ${HOMEPAGE}dist/
EXTRACT_SUFX= .tgz
HOMEPAGE= http://www.insecure.org/nmap/
MAINTAINER= Chad Loder <cloder@openbsd.org>
MAINTAINER= Dan Weeks <danimal@danimal.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
@ -18,17 +18,20 @@ PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= gnu dest
CONFIGURE_ARGS= --with-libpcap=/usr
CONFIGURE_ARGS= --with-libpcap=/usr --with-libpcre=${LOCALBASE}
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/nbase \
${WRKSRC}/nsock/src \
${WRKSRC}/libpcap-possiblymodified
FLAVORS= no_x11
FLAVOR?=
LIB_DEPENDS+= pcre::devel/pcre
.if ${FLAVOR:L:Mno_x11}
ALL_TARGET= nmap
.else
LIB_DEPENDS= gtk.1.2,gdk.1.2::x11/gtk+
LIB_DEPENDS+= gtk.1.2,gdk.1.2::x11/gtk+
USE_X11= Yes
ALL_TARGET= nmap nmapfe/nmapfe
.endif

View File

@ -1,3 +1,3 @@
MD5 (nmap-3.00.tgz) = 2b648bc66f1cedbeed230ef56f6549a8
RMD160 (nmap-3.00.tgz) = 12fae5fc1715575a5302609234f534b66b87fd50
SHA1 (nmap-3.00.tgz) = 7c51c4013bf70c223b81af5a5a171fc9af011df2
MD5 (nmap-3.48.tgz) = e8be0d30326ba0af5e07d3593609143c
RMD160 (nmap-3.48.tgz) = 17f2614129c7ad3e4acfff3f390edcec716c559a
SHA1 (nmap-3.48.tgz) = 4bac813617adbadc5c56ff51d94e3bfc85a6ab7b

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.4 2002/08/11 20:50:54 jsyn Exp $
--- Makefile.in.orig Thu Mar 15 13:03:42 2001
+++ Makefile.in Thu Mar 15 13:04:03 2001
@@ -17,7 +17,7 @@ CCOPT =
LIBPCAPDIR = @libpcapdir@
INCLS = -I$(LIBPCAPDIR)
DEFS = @DEFS@ -DNMAP_VERSION=\"$(NMAP_VERSION)\" -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
-CFLAGS = -g @CFLAGS@ $(CCOPT) $(DEFS) $(INCLS)
+CFLAGS = @CFLAGS@ $(CCOPT) $(DEFS) $(INCLS)
# CFLAGS = -g -Wall $(DEFS) $(INCLS)
STATIC =
LDFLAGS = @LDFLAGS@ $(STATIC)

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-nbase_Makefile_in,v 1.4 2002/08/11 20:50:54 jsyn Exp $
--- nbase/Makefile.in.orig Thu Mar 15 13:04:25 2001
+++ nbase/Makefile.in Thu Mar 15 13:04:40 2001
@@ -10,7 +10,7 @@ AR = ar
RANLIB = @RANLIB@
CCOPT =
DEFS = @DEFS@ -DNCRACK_VERSION=\"$(NCRACK_VERSION)\" -DHAVE_CONFIG_H=1
-CFLAGS = @CFLAGS@ -g $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
+CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
# CFLAGS = -g -Wall $(DEFS) $(INCLS)
STATIC =
LDFLAGS = @LDFLAGS@ $(STATIC)

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-nbase_configure,v 1.3 2003/12/09 18:42:37 brad Exp $
--- nbase/configure.orig 2003-10-10 12:36:03.000000000 -0700
+++ nbase/configure 2003-10-10 12:36:45.000000000 -0700
@@ -3192,6 +3192,9 @@ cat >>conftest.$ac_ext <<_ACEOF
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-nbase_configure_ac,v 1.1 2003/12/09 18:42:37 brad Exp $
--- nbase/configure.ac.orig 2003-10-10 12:35:59.000000000 -0700
+++ nbase/configure.ac 2003-10-10 12:36:16.000000000 -0700
@@ -141,6 +141,9 @@ AC_CHECK_HEADERS([netinet/if_ether.h],[]
[#if HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-tcpip.c,v 1.2 2001/01/09 16:10:17 naddy Exp $
--- tcpip.c.orig Sun Oct 8 23:30:03 2000
+++ tcpip.c Mon Jan 8 02:29:18 2001
@@ -317,27 +317,19 @@ inline int Sendto(char *functionname, in
struct sockaddr_in *sin = (struct sockaddr_in *) to;
int res;
-int retries = 0;
-int sleeptime = 0;
-do {
- if (TCPIP_DEBUGGING > 1) {
- log_write(LOG_STDOUT, "trying sendto(%d, packet, %d, 0, %s, %d)",
- sd, len, inet_ntoa(sin->sin_addr), tolen);
- }
- if ((res = sendto(sd, (const char *) packet, len, flags, to, tolen)) == -1) {
+if (TCPIP_DEBUGGING > 1) {
+ log_write(LOG_STDOUT, "trying sendto(%d, packet, %d, 0, %s, %d)",
+ sd, len, inet_ntoa(sin->sin_addr), tolen);
+}
+while ((res = sendto(sd, (const char *) packet, len, flags, to, tolen)) == -1) {
+ if (errno != ENOBUFS) {
error("sendto in %s: sendto(%d, packet, %d, 0, %s, %d) => %s",
functionname, sd, len, inet_ntoa(sin->sin_addr), tolen,
strerror(errno));
- if (retries > 2 || errno == EPERM)
- return -1;
- sleeptime = 15 * (1 << (2 * retries));
- error("Sleeping %d seconds then retrying", sleeptime);
- fflush(stderr);
- sleep(sleeptime);
+ return -1;
}
- retries++;
-} while( res == -1);
+}
if (TCPIP_DEBUGGING > 1)
log_write(LOG_STDOUT, "successfully sent %d bytes of raw_tcp!\n", res);

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-tcpip_cc,v 1.1 2003/12/09 18:42:37 brad Exp $
--- tcpip.cc.orig 2003-09-20 02:03:00.000000000 -0700
+++ tcpip.cc 2003-10-10 13:51:44.000000000 -0700
@@ -1524,7 +1524,8 @@ if (!pd) fatal("NULL packet device passe
gettimeofday(&tv_end, NULL);
*rcvdtime = tv_end;
#else
- *rcvdtime = head.ts;
+ rcvdtime->tv_sec = head.ts.tv_sec;
+ rcvdtime->tv_usec = head.ts.tv_usec;
assert(head.ts.tv_sec);
#endif
}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-tcpip_h,v 1.1 2003/12/09 18:42:37 brad Exp $
--- tcpip.h.orig 2003-10-10 14:02:14.000000000 -0700
+++ tcpip.h 2003-10-10 14:00:52.000000000 -0700
@@ -239,7 +239,7 @@ extern "C" {
#endif
#ifndef BSDFIX
-#if FREEBSD || BSDI || NETBSD || DEC
+#if FREEBSD || OPENBSD || BSDI || NETBSD || DEC
#define BSDFIX(x) x
#define BSDUFIX(x) x
#else

View File

@ -1,35 +0,0 @@
$OpenBSD: patch-utils.c,v 1.2 2001/01/09 16:10:17 naddy Exp $
--- utils.c.orig Thu Oct 5 05:46:19 2000
+++ utils.c Mon Jan 8 02:29:18 2001
@@ -184,6 +184,23 @@ get_random_bytes(&s, sizeof(unsigned sho
return s;
}
+#ifdef __OpenBSD__
+int get_random_bytes(void *buf, int numbytes)
+{
+ u_int32_t i;
+
+ while (numbytes > 4) {
+ *(u_int32_t *)buf = arc4random();
+ buf += 4;
+ numbytes -= 4;
+ }
+ if (numbytes > 0) {
+ i = arc4random();
+ memcpy(buf, &i, numbytes);
+ }
+ return 0;
+}
+#else
int get_random_bytes(void *buf, int numbytes) {
static char bytebuf[2048];
static char badrandomwarning = 0;
@@ -239,6 +256,7 @@ tmp = bytesleft;
bytesleft = 0;
return get_random_bytes((char *)buf + tmp, numbytes - tmp);
}
+#endif /* OpenBSD */
/* Scramble the contents of an array*/
void genfry(unsigned char *arr, int elem_sz, int num_elem) {

View File

@ -28,5 +28,3 @@ parallel pings. Nmap also offers flexible target and port
specification, decoy scanning, determination of TCP sequence
predictability characteristics, and output to machine parseable or
human readable log files.
WWW: ${HOMEPAGE}

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.9 2001/01/09 18:52:35 naddy Exp $
@comment $OpenBSD: PLIST,v 1.10 2003/12/09 18:42:37 brad Exp $
bin/nmap
man/man1/nmap.1
!%%no_x11%%
@ -6,4 +6,5 @@ share/nmap/nmap-os-fingerprints
share/nmap/nmap-protocols
share/nmap/nmap-rpc
share/nmap/nmap-services
share/nmap/nmap-service-probes
@dirrm share/nmap