On 08/25/13 17:25, Florian Stinglmayr wrote:
> On Sun, Aug 25, 2013 at 01:54:14PM +0200, Giovanni Bechis wrote:
>> I have an update to 6.40 which removes the conversions between timeval
>> and bpf_timeval by linking with their libpcap.
>> I will post it asap.
>> Giovanni
>
> Thanks a lot!
>
> Florian
>
Here is the diff, tested @amd64 with big time_t.
In the makefile i used their version of libpcap to be able to delete the
bpf_timeval related patches.
Cheers
Giovanni
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/nmap/Makefile,v
retrieving revision 1.107
diff -u -p -u -p -r1.107 Makefile
--- Makefile 10 May 2013 12:27:45 -0000 1.107
+++ Makefile 30 Jul 2013 09:08:20 -0000
@@ -3,10 +3,9 @@
COMMENT-main= scan ports and fingerprint stack of network hosts
COMMENT-zenmap= graphical frontend for nmap
-MODPY_EGG_VERSION= 6.25
+MODPY_EGG_VERSION= 6.40
DISTNAME= nmap-${MODPY_EGG_VERSION}
PKGNAME-main= ${DISTNAME}
-REVISION-main= 0
PKGNAME-zenmap= nmap-zenmap-${MODPY_EGG_VERSION}
CATEGORIES= net security
@@ -26,14 +25,14 @@ USE_GMAKE= yes
MODLUA_SA= Yes
MODLUA_VERSION=5.2
MODULES= lang/python \
- lang/lua
+ lang/lua
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
- CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+ CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -I${MODLUA_INCL_DIR}" \
CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --with-libpcap=/usr \
+CONFIGURE_ARGS= --with-libpcap=included \
--with-openssl=/usr \
--with-liblua=${LOCALBASE} \
--with-libpcre=${LOCALBASE} \
@@ -41,9 +40,9 @@ CONFIGURE_ARGS= --with-libpcap=/usr \
--without-nmap-update \
--disable-nls
-WANTLIB-main= c crypto m pcap ssl stdc++ pcre pthread ${MODLUA_WANTLIB}
-LIB_DEPENDS-main= devel/pcre \
- ${MODLUA_LIB_DEPENDS}
+WANTLIB-main= c crypto m ssl stdc++ pcre pthread ${MODLUA_WANTLIB}
+LIB_DEPENDS-main=devel/pcre \
+ ${MODLUA_LIB_DEPENDS}
RUN_DEPENDS-main=
@@ -55,7 +54,7 @@ RUN_DEPENDS-zenmap= x11/py-gtk2 \
NO_TEST= Yes
post-extract:
- @cd ${WRKSRC} && rm -rf libpcap/ liblua/ libpcre/
+ @cd ${WRKSRC} && rm -rf liblua/ libpcre/
pre-configure:
${SUBST_CMD} ${WRKSRC}/zenmap/install_scripts/unix/su-to-zenmap.sh \
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/nmap/distinfo,v
retrieving revision 1.27
diff -u -p -u -p -r1.27 distinfo
--- distinfo 19 Dec 2012 17:12:11 -0000 1.27
+++ distinfo 30 Jul 2013 09:08:20 -0000
@@ -1,2 +1,2 @@
-SHA256 (nmap-6.25.tgz) = QsVP1cxfBeXfkJdX1iMHECqP8d+vXCYmsctfLs0Anlc=
-SIZE (nmap-6.25.tgz) = 9374716
+SHA256 (nmap-6.40.tgz) = zri/0TgAZxlENol4fXGzMjsSZJH2q9odCg1/PU8De0s=
+SIZE (nmap-6.40.tgz) = 9638479
Index: patches/patch-FPEngine_cc
===================================================================
RCS file: patches/patch-FPEngine_cc
diff -N patches/patch-FPEngine_cc
--- patches/patch-FPEngine_cc 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-FPEngine_cc,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- FPEngine.cc.orig Wed Oct 31 18:00:55 2012
-+++ FPEngine.cc Fri Nov 30 12:41:47 2012
-@@ -477,7 +477,7 @@ void FPNetworkControl::response_reception_handler(nsoc
- enum nse_type type = nse_type(nse);
- const u8 *rcvd_pkt = NULL; /* Points to the captured packet */
- size_t rcvd_pkt_len = 0; /* Lenght of the captured packet */
-- struct timeval pcaptime; /* Time the packet was captured */
-+ struct bpf_timeval pcaptime; /* Time the packet was captured */
- struct sockaddr_storage sent_ss;
- struct sockaddr_storage rcvd_ss;
- struct sockaddr_in *rcvd_ss4 = (struct sockaddr_in *)&rcvd_ss;
Index: patches/patch-NmapOps_cc
===================================================================
RCS file: patches/patch-NmapOps_cc
diff -N patches/patch-NmapOps_cc
--- patches/patch-NmapOps_cc 16 Jul 2012 07:39:31 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-NmapOps_cc,v 1.1 2012/07/16 07:39:31 giovanni Exp $
---- NmapOps.cc.orig Tue May 8 07:49:51 2012
-+++ NmapOps.cc Fri May 25 14:45:19 2012
-@@ -197,11 +197,11 @@ void NmapOps::setSourceSockAddr(struct sockaddr_storag
-
- // Number of seconds since getStartTime(). The current time is an
- // optional argument to avoid an extra gettimeofday() call.
--float NmapOps::TimeSinceStart(const struct timeval *now) {
-+float NmapOps::TimeSinceStart(const struct bpf_timeval *now) {
- struct timeval tv;
- if (!now)
- gettimeofday(&tv, NULL);
-- else tv = *now;
-+ else tv = (timeval &)*now;
-
- return TIMEVAL_FSEC_SUBTRACT(tv, start_time);
- }
Index: patches/patch-NmapOps_h
===================================================================
RCS file: patches/patch-NmapOps_h
diff -N patches/patch-NmapOps_h
--- patches/patch-NmapOps_h 16 Jul 2012 07:39:31 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-NmapOps_h,v 1.1 2012/07/16 07:39:31 giovanni Exp $
---- NmapOps.h.orig Tue May 8 07:49:51 2012
-+++ NmapOps.h Fri May 25 12:39:10 2012
-@@ -117,10 +117,10 @@ class NmapOps {
- void setSourceSockAddr(struct sockaddr_storage *ss, size_t ss_len);
-
- // The time this obj. was instantiated or last ReInit()ed.
-- const struct timeval *getStartTime() { return &start_time; }
-+ const struct bpf_timeval *getStartTime() { return (const bpf_timeval*)&start_time; }
- // Number of seconds since getStartTime(). The current time is an
- // optional argument to avoid an extra gettimeofday() call.
-- float TimeSinceStart(const struct timeval *now=NULL);
-+ float TimeSinceStart(const struct bpf_timeval *now=NULL);
-
-
-
Index: patches/patch-libdnet-stripped_src_intf_c
===================================================================
RCS file: patches/patch-libdnet-stripped_src_intf_c
diff -N patches/patch-libdnet-stripped_src_intf_c
--- patches/patch-libdnet-stripped_src_intf_c 10 May 2013 12:27:45 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-libdnet-stripped_src_intf_c,v 1.3 2013/05/10 12:27:45 giovanni Exp $
---- libdnet-stripped/src/intf.c.orig Mon Sep 10 03:17:28 2012
-+++ libdnet-stripped/src/intf.c Fri May 10 09:54:54 2013
-@@ -77,7 +77,13 @@
- /* XXX - superset of ifreq, for portable SIOC{A,D}IFADDR */
- struct dnet_ifaliasreq {
- char ifra_name[IFNAMSIZ];
-- struct sockaddr ifra_addr;
-+ union {
-+ struct sockaddr ifrau_addr;
-+ int ifrau_align;
-+ } ifra_ifrau;
-+#ifndef ifra_addr
-+#define ifra_addr ifra_ifrau.ifrau_addr
-+#endif
- struct sockaddr ifra_brdaddr;
- struct sockaddr ifra_mask;
- int ifra_cookie; /* XXX - IRIX!@#$ */
-@@ -308,7 +314,7 @@ intf_set(intf_t *intf, const struct intf_entry *entry)
- }
- /* Set interface address. */
- if (entry->intf_addr.addr_type == ADDR_TYPE_IP) {
--#ifdef BSD
-+#if defined(BSD) && !defined(__OpenBSD__)
- /* XXX - why must this happen before SIOCSIFADDR? */
- if (addr_btos(entry->intf_addr.addr_bits,
- &ifr.ifr_addr) == 0) {
Index: patches/patch-ncat_ncat_core_c
===================================================================
RCS file: patches/patch-ncat_ncat_core_c
diff -N patches/patch-ncat_ncat_core_c
--- patches/patch-ncat_ncat_core_c 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-ncat_ncat_core_c,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- ncat/ncat_core.c.orig Tue Nov 13 09:40:49 2012
-+++ ncat/ncat_core.c Fri Nov 30 12:41:47 2012
-@@ -127,7 +127,7 @@ union sockaddr_u socksconnect;
- struct options o;
-
- /* The time the program was started, for exit statistics in connect mode. */
--struct timeval start_time;
-+struct bpf_timeval start_time;
-
- /* Initializes global options to their default values. */
- void options_init(void)
Index: patches/patch-ncat_ncat_core_h
===================================================================
RCS file: patches/patch-ncat_ncat_core_h
diff -N patches/patch-ncat_ncat_core_h
--- patches/patch-ncat_ncat_core_h 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-ncat_ncat_core_h,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- ncat/ncat_core.h.orig Tue Nov 13 09:40:49 2012
-+++ ncat/ncat_core.h Fri Nov 30 12:41:47 2012
-@@ -168,7 +168,7 @@ struct options {
- extern struct options o;
-
- /* The time the program was started, for exit statistics in connect mode. */
--extern struct timeval start_time;
-+extern struct bpf_timeval start_time;
-
- /* Initializes global options to their default values. */
- void options_init(void);
Index: patches/patch-nmap_tty_cc
===================================================================
RCS file: patches/patch-nmap_tty_cc
diff -N patches/patch-nmap_tty_cc
--- patches/patch-nmap_tty_cc 16 Jul 2012 07:39:31 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-nmap_tty_cc,v 1.1 2012/07/16 07:39:31 giovanni Exp $
---- nmap_tty.cc.orig Fri May 25 15:11:33 2012
-+++ nmap_tty.cc Fri May 25 15:13:22 2012
-@@ -290,7 +290,7 @@ bool keyWasPressed()
- gettimeofday(&now, NULL);
- if (stats_time.tv_sec == 0) {
- /* Initialize the scheduled stats time. */
-- stats_time = *o.getStartTime();
-+ stats_time = (const timeval&)*o.getStartTime();
- TIMEVAL_ADD(stats_time, stats_time, (time_t) (o.stats_interval * 1000000));
- }
-
Index: patches/patch-nping_EchoServer_cc
===================================================================
RCS file: patches/patch-nping_EchoServer_cc
diff -N patches/patch-nping_EchoServer_cc
--- patches/patch-nping_EchoServer_cc 16 Jul 2012 07:39:31 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-nping_EchoServer_cc,v 1.3 2012/07/16 07:39:31 giovanni Exp $
---- nping/EchoServer.cc.orig Thu Mar 1 07:53:35 2012
-+++ nping/EchoServer.cc Wed Jul 11 15:20:46 2012
-@@ -840,7 +840,7 @@ int EchoServer::nep_capture_handler(nsock_pool nsp, ns
- const unsigned char *packet=NULL;
- const unsigned char *link=NULL;
- nsock_iod nsi = nse_iod(nse);
-- struct timeval pcaptime;
-+ struct bpf_timeval pcaptime;
- nsock_iod clnt_iod=NULL;
- NEPContext *ctx=NULL;
- EchoHeader pkt_out;
-@@ -1421,9 +1421,9 @@ int EchoServer::start() {
- /* Set nsock trace level */
- gettimeofday(&now, NULL);
- if( o.getDebugging() == DBG_5)
-- nsp_settrace(nsp, NULL, 1 , &now);
-+ nsp_settrace(nsp, NULL, 1 , (const bpf_timeval*)&now);
- else if( o.getDebugging() > DBG_5 )
-- nsp_settrace(nsp, NULL, 10 , &now);
-+ nsp_settrace(nsp, NULL, 10 , (const bpf_timeval*)&now);
-
- /* Create new IOD for pcap */
- if ((pcap_nsi = nsi_new(nsp, NULL)) == NULL)
Index: patches/patch-nping_ProbeMode_cc
===================================================================
RCS file: patches/patch-nping_ProbeMode_cc
diff -N patches/patch-nping_ProbeMode_cc
--- patches/patch-nping_ProbeMode_cc 19 Dec 2012 17:12:11 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-nping_ProbeMode_cc,v 1.3 2012/12/19 17:12:11 giovanni Exp $
---- nping/ProbeMode.cc.orig Wed Oct 3 17:43:18 2012
-+++ nping/ProbeMode.cc Fri Nov 30 12:41:48 2012
-@@ -130,9 +130,9 @@ int ProbeMode::init_nsock(){
- /* Set nsock trace level */
- gettimeofday(&now, NULL);
- if( o.getDebugging() == DBG_5)
-- nsp_settrace(nsp, NULL, 1 , &now);
-+ nsp_settrace(nsp, NULL, 1 , (const bpf_timeval*)&now);
- else if( o.getDebugging() > DBG_5 )
-- nsp_settrace(nsp, NULL, 10 , &now);
-+ nsp_settrace(nsp, NULL, 10 , (const bpf_timeval*)&now);
- /* Flag it as already inited so we don't do it again */
- nsock_init=true;
- }
-@@ -1521,8 +1521,8 @@ void ProbeMode::probe_nping_event_handler(nsock_pool n
- u16 *ethtype=NULL;
- u8 buffer[512+1];
- size_t link_offset=0;
-- static struct timeval pcaptime;
-- static struct timeval prevtime;
-+ static struct bpf_timeval pcaptime;
-+ static struct bpf_timeval prevtime;
- NpingTarget *trg=NULL;
- u16 *prt=NULL;
- u8 proto=0;
Index: patches/patch-nse_nsock_cc
===================================================================
RCS file: patches/patch-nse_nsock_cc
diff -N patches/patch-nse_nsock_cc
--- patches/patch-nse_nsock_cc 19 Dec 2012 17:12:11 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-nse_nsock_cc,v 1.3 2012/12/19 17:12:11 giovanni Exp $
---- nse_nsock.cc.orig Thu Nov 29 04:19:52 2012
-+++ nse_nsock.cc Fri Nov 30 12:41:48 2012
-@@ -982,7 +982,7 @@ static void pcap_receive_handler (nsock_pool nsp, nsoc
- {
- const unsigned char *l2_data, *l3_data;
- size_t l2_len, l3_len, packet_len;
-- struct timeval tv;
-+ struct bpf_timeval tv;
-
- nse_readpcap(nse, &l2_data, &l2_len, &l3_data, &l3_len, &packet_len, &tv);
-
Index: patches/patch-nsock_include_nsock_h
===================================================================
RCS file: patches/patch-nsock_include_nsock_h
diff -N patches/patch-nsock_include_nsock_h
--- patches/patch-nsock_include_nsock_h 19 Dec 2012 17:12:11 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-$OpenBSD: patch-nsock_include_nsock_h,v 1.8 2012/12/19 17:12:11 giovanni Exp $
---- nsock/include/nsock.h.orig Mon Nov 12 21:44:37 2012
-+++ nsock/include/nsock.h Fri Nov 30 12:41:48 2012
-@@ -90,6 +90,8 @@
- extern "C" {
- #endif
-
-+#include <pcap.h>
-+
- /* The read calls will generally return after reading at least this
- * much data so that the caller can process it and so that the
- * connection spewing data doesn't monopolize resources. The caller
-@@ -186,7 +188,7 @@ void *nsp_getud(nsock_pool nsp);
- * everything. The basetime can be NULL to print trace lines with the current
- * time, otherwise the difference between the current time and basetime will be
- * used (the time program execution starts would be a good candidate) */
--void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct timeval *basetime);
-+void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct bpf_timeval *basetime);
-
- /* Turns on or off broadcast support on new sockets. Default is off (0, false)
- * set in nsp_new(). Any non-zero (true) value sets SO_BROADCAST on all new
-@@ -550,7 +552,7 @@ int nsock_event_cancel(nsock_pool ms_pool, nsock_event
- * avoid a system call, but in many circumstances it is better to use nsock's
- * time rather than the system time. If nsock has never obtained the time when
- * you call it, it will do so before returning */
--const struct timeval *nsock_gettimeofday();
-+const struct bpf_timeval *nsock_gettimeofday();
-
-
- #ifdef HAVE_PCAP
-@@ -581,7 +583,7 @@ nsock_event_id nsock_pcap_read_packet(nsock_pool nsp,
- * think that host is a bit further.
- * */
- void nse_readpcap(nsock_event nsee, const unsigned char **l2_data, size_t *l2_len, const unsigned char **l3_data, size_t *l3_len,
-- size_t *packet_len, struct timeval *ts);
-+ size_t *packet_len, struct bpf_timeval *ts);
-
- /* Well. Just pcap-style datalink. Like DLT_EN10MB or DLT_SLIP. Check in pcap(3) manpage. */
- int nsi_pcap_linktype(nsock_iod nsiod);
Index: patches/patch-nsock_src_nsock_core_c
===================================================================
RCS file: patches/patch-nsock_src_nsock_core_c
diff -N patches/patch-nsock_src_nsock_core_c
--- patches/patch-nsock_src_nsock_core_c 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-nsock_src_nsock_core_c,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- nsock/src/nsock_core.c.orig Thu Nov 29 04:19:52 2012
-+++ nsock/src/nsock_core.c Fri Nov 30 12:41:48 2012
-@@ -1130,7 +1130,7 @@ void nsock_loop_quit(nsock_pool nsp) {
- * avoid a system call, but in many circumstances it is better to use nsock's
- * time rather than the system time. If nsock has never obtained the time when
- * you call it, it will do so before returning */
--const struct timeval *nsock_gettimeofday() {
-+const struct bpf_timeval *nsock_gettimeofday() {
- if (nsock_tod.tv_sec == 0)
- gettimeofday(&nsock_tod, NULL);
- return &nsock_tod;
Index: patches/patch-nsock_src_nsock_internal_h
===================================================================
RCS file: patches/patch-nsock_src_nsock_internal_h
diff -N patches/patch-nsock_src_nsock_internal_h
--- patches/patch-nsock_src_nsock_internal_h 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-nsock_src_nsock_internal_h,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- nsock/src/nsock_internal.h.orig Mon Nov 12 21:44:37 2012
-+++ nsock/src/nsock_internal.h Fri Nov 30 12:41:48 2012
-@@ -203,7 +203,7 @@ typedef struct {
- int tracelevel;
- FILE *tracefile;
- /* This time is subtracted from the current time for trace reports */
-- struct timeval tracebasetime;
-+ struct bpf_timeval tracebasetime;
-
- /* If true, new sockets will have SO_BROADCAST set */
- int broadcast;
Index: patches/patch-nsock_src_nsock_pcap_c
===================================================================
RCS file: patches/patch-nsock_src_nsock_pcap_c
diff -N patches/patch-nsock_src_nsock_pcap_c
--- patches/patch-nsock_src_nsock_pcap_c 16 Jul 2012 07:39:31 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-nsock_src_nsock_pcap_c,v 1.5 2012/07/16 07:39:31 giovanni Exp $
---- nsock/src/nsock_pcap.c.orig Thu Mar 1 07:32:23 2012
-+++ nsock/src/nsock_pcap.c Fri May 25 09:38:27 2012
-@@ -76,7 +76,7 @@
-
- #include "nsock_pcap.h"
-
--extern struct timeval nsock_tod;
-+extern struct bpf_timeval nsock_tod;
-
- #if HAVE_PCAP
- static int nsock_pcap_get_l3_offset(pcap_t *pt, int *dl);
-@@ -375,7 +375,7 @@ int do_actual_pcap_read(msevent *nse) {
- npp.ts = pkt_header->ts;
- #else
- /* on these platforms time received from pcap is invalid. It's better to set current time */
-- memcpy(&npp.ts, nsock_gettimeofday(), sizeof(struct timeval));
-+ memcpy(&npp.ts, nsock_gettimeofday(), sizeof(struct bpf_timeval));
- #endif
- npp.len = pkt_header->len;
- npp.caplen = pkt_header->caplen;
-@@ -406,7 +406,7 @@ int do_actual_pcap_read(msevent *nse) {
- }
-
- void nse_readpcap(nsock_event nsee, const unsigned char **l2_data, size_t *l2_len,
-- const unsigned char **l3_data, size_t *l3_len, size_t *packet_len, struct timeval *ts) {
-+ const unsigned char **l3_data, size_t *l3_len, size_t *packet_len, struct bpf_timeval *ts) {
- msevent *nse = (msevent *)nsee;
- msiod *iod = nse->iod;
- mspcap *mp = (mspcap *)iod->pcap;
Index: patches/patch-nsock_src_nsock_pcap_h
===================================================================
RCS file: patches/patch-nsock_src_nsock_pcap_h
diff -N patches/patch-nsock_src_nsock_pcap_h
--- patches/patch-nsock_src_nsock_pcap_h 16 Jul 2012 07:39:31 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-nsock_src_nsock_pcap_h,v 1.5 2012/07/16 07:39:31 giovanni Exp $
---- nsock/src/nsock_pcap.h.orig Sat Apr 7 10:16:08 2012
-+++ nsock/src/nsock_pcap.h Fri May 25 09:38:57 2012
-@@ -137,7 +137,7 @@ typedef struct{
- } mspcap;
-
- typedef struct{
-- struct timeval ts;
-+ struct bpf_timeval ts;
- int caplen;
- int len;
- const unsigned char *packet; /* caplen bytes */
Index: patches/patch-nsock_src_nsock_pool_c
===================================================================
RCS file: patches/patch-nsock_src_nsock_pool_c
diff -N patches/patch-nsock_src_nsock_pool_c
--- patches/patch-nsock_src_nsock_pool_c 16 Jul 2012 07:39:31 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-nsock_src_nsock_pool_c,v 1.1 2012/07/16 07:39:31 giovanni Exp $
---- nsock/src/nsock_pool.c.orig Fri May 25 10:21:45 2012
-+++ nsock/src/nsock_pool.c Fri May 25 10:22:23 2012
-@@ -123,7 +123,7 @@ void *nsp_getud(nsock_pool nsp) {
- * everything. The basetime can be NULL to print trace lines with the current
- * time, otherwise the difference between the current time and basetime will be
- * used (the time program execution starts would be a good candidate) */
--void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct timeval *basetime) {
-+void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct bpf_timeval *basetime) {
- mspool *mt = (mspool *)nsp;
-
- if (file == NULL)
-@@ -134,7 +134,7 @@ void nsp_settrace(nsock_pool nsp, FILE *file, int leve
- mt->tracelevel = level;
-
- if (!basetime)
-- memset(&mt->tracebasetime, 0, sizeof(struct timeval));
-+ memset(&mt->tracebasetime, 0, sizeof(struct bpf_timeval));
- else
- mt->tracebasetime = *basetime;
- }
Index: patches/patch-output_cc
===================================================================
RCS file: patches/patch-output_cc
diff -N patches/patch-output_cc
--- patches/patch-output_cc 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-$OpenBSD: patch-output_cc,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- output.cc.orig Thu Nov 29 04:19:52 2012
-+++ output.cc Fri Nov 30 12:41:48 2012
-@@ -2411,7 +2411,7 @@ void printStatusMessage() {
- // Pre-computations
- struct timeval tv;
- gettimeofday(&tv, NULL);
-- int time = (int) (o.TimeSinceStart(&tv));
-+ int time = (int) (o.TimeSinceStart((const bpf_timeval*)&tv));
-
- log_write(LOG_STDOUT, "Stats: %d:%02d:%02d elapsed; %d hosts completed (%d up), %d undergoing %s\n",
- time / 60 / 60, time / 60 % 60, time % 60, o.numhosts_scanned,
-@@ -2431,13 +2431,13 @@ void print_xml_finished_open(time_t timep, const struc
- xml_open_start_tag("finished");
- xml_attribute("time", "%lu", (unsigned long) timep);
- xml_attribute("timestr", "%s", mytime);
-- xml_attribute("elapsed", "%.2f", o.TimeSinceStart(tv));
-+ xml_attribute("elapsed", "%.2f", o.TimeSinceStart((const bpf_timeval*)&tv));
- xml_attribute("summary",
- "Nmap done at %s; %d %s (%d %s up) scanned in %.2f seconds",
- mytime, o.numhosts_scanned,
- (o.numhosts_scanned == 1) ? "IP address" : "IP addresses",
- o.numhosts_up, (o.numhosts_up == 1) ? "host" : "hosts",
-- o.TimeSinceStart(tv));
-+ o.TimeSinceStart((const bpf_timeval*)&tv));
- }
-
- void print_xml_hosts() {
-@@ -2482,7 +2482,7 @@ void printfinaloutput() {
- o.numhosts_scanned,
- (o.numhosts_scanned == 1) ? "IP address" : "IP addresses",
- o.numhosts_up, (o.numhosts_up == 1) ? "host" : "hosts",
-- o.TimeSinceStart(&tv));
-+ o.TimeSinceStart((const bpf_timeval*)&tv));
- if (o.verbose && o.isr00t && o.RawScan())
- log_write(LOG_STDOUT | LOG_SKID, " %s\n",
- getFinalPacketStats(statbuf, sizeof(statbuf)));
-@@ -2504,7 +2504,7 @@ void printfinaloutput() {
- mytime, o.numhosts_scanned,
- (o.numhosts_scanned == 1) ? "IP address" : "IP addresses",
- o.numhosts_up, (o.numhosts_up == 1) ? "host" : "hosts",
-- o.TimeSinceStart(&tv));
-+ o.TimeSinceStart((const bpf_timeval*)&tv));
-
- xml_end_tag(); /* nmaprun */
- xml_newline();
Index: patches/patch-service_scan_cc
===================================================================
RCS file: patches/patch-service_scan_cc
diff -N patches/patch-service_scan_cc
--- patches/patch-service_scan_cc 19 Dec 2012 17:12:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,111 +0,0 @@
-$OpenBSD: patch-service_scan_cc,v 1.2 2012/12/19 17:12:11 giovanni Exp $
---- service_scan.cc.orig Mon Oct 22 17:33:57 2012
-+++ service_scan.cc Fri Nov 30 12:41:48 2012
-@@ -1964,10 +1964,10 @@ static void startNextProbe(nsock_pool nsp, nsock_iod n
- // if the last probe was the NULL probe.
- probe = svc->nextProbe(false);
- if (probe) {
-- svc->currentprobe_exec_time = *nsock_gettimeofday();
-+ svc->currentprobe_exec_time = (const timeval&)*nsock_gettimeofday();
- send_probe_text(nsp, nsi, svc, probe);
- nsock_read(nsp, nsi, servicescan_read_handler,
-- svc->currentprobe_timemsleft(nsock_gettimeofday()), svc);
-+ svc->currentprobe_timemsleft((const timeval*)nsock_gettimeofday()), svc);
- } else {
- // Should only happen if someone has a highly perverse nmap-service-probes
- // file. Null scan should generally never be the only probe.
-@@ -2012,11 +2012,11 @@ static void startNextProbe(nsock_pool nsp, nsock_iod n
- } else {
- assert(svc->proto == IPPROTO_UDP);
- /* Can maintain the same UDP "connection" */
-- svc->currentprobe_exec_time = *nsock_gettimeofday();
-+ svc->currentprobe_exec_time = (const timeval&)*nsock_gettimeofday();
- send_probe_text(nsp, nsi, svc, probe);
- // Now let us read any results
- nsock_read(nsp, nsi, servicescan_read_handler,
-- svc->currentprobe_timemsleft(nsock_gettimeofday()), svc);
-+ svc->currentprobe_timemsleft((const timeval*)nsock_gettimeofday()), svc);
- }
- } else {
- // No more probes remaining! Failed to match
-@@ -2083,14 +2083,14 @@ static void considerPrintingStats(ServiceGroup *SG) {
- if (keyWasPressed()) {
- SG->SPM->printStats(SG->services_finished.size() /
- ((double)SG->services_remaining.size() + SG->services_in_progress.size() +
-- SG->services_finished.size()), nsock_gettimeofday());
-+ SG->services_finished.size()), (const timeval*)nsock_gettimeofday());
- }
-
-
- /* Perhaps this should be made more complex, but I suppose it should be
- good enough for now. */
-- if (SG->SPM->mayBePrinted(nsock_gettimeofday())) {
-- SG->SPM->printStatsIfNecessary(SG->services_finished.size() / ((double)SG->services_remaining.size() + SG->services_in_progress.size() + SG->services_finished.size()), nsock_gettimeofday());
-+ if (SG->SPM->mayBePrinted((const timeval*)nsock_gettimeofday())) {
-+ SG->SPM->printStatsIfNecessary(SG->services_finished.size() / ((double)SG->services_remaining.size() + SG->services_in_progress.size() + SG->services_finished.size()), (const timeval*)nsock_gettimeofday());
- }
- }
-
-@@ -2117,7 +2117,7 @@ static void handleHostIfDone(ServiceGroup *SG, Target
- }
-
- if (!found) {
-- target->stopTimeOutClock(nsock_gettimeofday());
-+ target->stopTimeOutClock((const timeval*)nsock_gettimeofday());
- if (target->timedOut(NULL)) {
- SG->num_hosts_timedout++;
- }
-@@ -2173,7 +2173,7 @@ static int launchSomeServiceProbes(nsock_pool nsp, Ser
- !SG->services_remaining.empty()) {
- // Start executing a probe from the new list and move it to in_progress
- svc = SG->services_remaining.front();
-- if (svc->target->timedOut(nsock_gettimeofday())) {
-+ if (svc->target->timedOut((const timeval*)nsock_gettimeofday())) {
- end_svcprobe(nsp, PROBESTATE_INCOMPLETE, SG, svc, NULL);
- continue;
- }
-@@ -2232,7 +2232,7 @@ static void servicescan_connect_handler(nsock_pool nsp
-
- assert(type == NSE_TYPE_CONNECT || type == NSE_TYPE_CONNECT_SSL);
-
-- if (svc->target->timedOut(nsock_gettimeofday())) {
-+ if (svc->target->timedOut((const timeval*)nsock_gettimeofday())) {
- end_svcprobe(nsp, PROBESTATE_INCOMPLETE, SG, svc, nsi);
- } else if (status == NSE_STATUS_SUCCESS) {
-
-@@ -2258,10 +2258,10 @@ static void servicescan_connect_handler(nsock_pool nsp
-
- // Yeah! Connection made to the port. Send the appropriate probe
- // text (if any is needed -- might be NULL probe)
-- svc->currentprobe_exec_time = *nsock_gettimeofday();
-+ svc->currentprobe_exec_time = (const timeval&)*nsock_gettimeofday();
- send_probe_text(nsp, nsi, svc, probe);
- // Now let us read any results
-- nsock_read(nsp, nsi, servicescan_read_handler, svc->currentprobe_timemsleft(nsock_gettimeofday()), svc);
-+ nsock_read(nsp, nsi, servicescan_read_handler, svc->currentprobe_timemsleft((const timeval*)nsock_gettimeofday()), svc);
- } else if (status == NSE_STATUS_TIMEOUT || status == NSE_STATUS_ERROR) {
- // This is not good. The connect() really shouldn't generally
- // be timing out like that. We'll mark this svc as incomplete
-@@ -2296,11 +2296,11 @@ static void servicescan_write_handler(nsock_pool nsp,
- if (keyWasPressed()) {
- SG->SPM->printStats(SG->services_finished.size() /
- ((double)SG->services_remaining.size() + SG->services_in_progress.size() +
-- SG->services_finished.size()), nsock_gettimeofday());
-+ SG->services_finished.size()), (const timeval*)nsock_gettimeofday());
- }
-
-
-- if (svc->target->timedOut(nsock_gettimeofday())) {
-+ if (svc->target->timedOut((const timeval*)nsock_gettimeofday())) {
- end_svcprobe(nsp, PROBESTATE_INCOMPLETE, SG, svc, nsi);
- return;
- }
-@@ -2346,7 +2346,7 @@ static void servicescan_read_handler(nsock_pool nsp, n
-
- assert(type == NSE_TYPE_READ);
-
-- if (svc->target->timedOut(nsock_gettimeofday())) {
-+ if (svc->target->timedOut((const timeval*)nsock_gettimeofday())) {
- end_svcprobe(nsp, PROBESTATE_INCOMPLETE, SG, svc, nsi);
- } else if (status == NSE_STATUS_SUCCESS) {
- // w00p, w00p, we read something back from the port.
Index: patches/patch-tcpip_cc
===================================================================
RCS file: patches/patch-tcpip_cc
diff -N patches/patch-tcpip_cc
--- patches/patch-tcpip_cc 19 Dec 2012 17:12:11 -0000 1.14
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
---- tcpip.cc.orig Wed Oct 31 18:00:55 2012
-+++ tcpip.cc Fri Nov 30 12:41:48 2012
-@@ -99,7 +99,7 @@
-
- #include "nbase.h"
- #include "portreasons.h"
--#include <dnet.h>
-+#include "dnet.h"
- #include "tcpip.h"
- #include "NmapOps.h"
- #include "Target.h"
-@@ -228,7 +228,7 @@ void PacketTrace::traceArp(pdirection pdir, const u8 *
-
- log_write(LOG_STDOUT | LOG_NORMAL, "%s (%.4fs) ARP %s\n",
- (pdir == SENT) ? "SENT" : "RCVD",
-- o.TimeSinceStart(&tv), arpdesc);
-+ o.TimeSinceStart((const bpf_timeval*)&tv), arpdesc);
-
- return;
- }
-@@ -303,7 +303,7 @@ void PacketTrace::traceND(pdirection pdir, const u8 *f
- inet_ntop(AF_INET6, &ip6->ip6_dst, dst, sizeof(dst));
- log_write(LOG_STDOUT | LOG_NORMAL, "%s (%.4fs) %s %s > %s %s\n",
- (pdir == SENT) ? "SENT" : "RCVD",
-- o.TimeSinceStart(&tv), label, src, dst, desc);
-+ o.TimeSinceStart((const bpf_timeval*)&tv), label, src, dst, desc);
-
- return;
- }
-@@ -359,7 +359,7 @@ void PacketTrace::trace(pdirection pdir, const u8 *pac
-
- log_write(LOG_STDOUT | LOG_NORMAL, "%s (%.4fs) %s\n",
- (pdir == SENT) ? "SENT" : "RCVD",
-- o.TimeSinceStart(&tv), nmap_format_ippacket(packet, len));
-+ o.TimeSinceStart((const bpf_timeval*)&tv), nmap_format_ippacket(packet, len));
-
- return;
- }
-@@ -425,7 +425,7 @@ void PacketTrace::traceConnect(u8 proto, const struct
-
- log_write(LOG_STDOUT | LOG_NORMAL,
- "CONN (%.4fs) %s localhost > %s:%d => %s\n",
-- o.TimeSinceStart(&tv),
-+ o.TimeSinceStart((const bpf_timeval*)&tv),
- (proto == IPPROTO_TCP) ? "TCP" : "UDP", targetipstr,
- targetport, errbuf);
- }
Index: patches/patch-zenmap_install_scripts_unix_su-to-zenmap_sh
===================================================================
RCS file: patches/patch-zenmap_install_scripts_unix_su-to-zenmap_sh
diff -N patches/patch-zenmap_install_scripts_unix_su-to-zenmap_sh
--- patches/patch-zenmap_install_scripts_unix_su-to-zenmap_sh 19 Dec 2012 17:12:11 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-zenmap_install_scripts_unix_su-to-zenmap_sh,v 1.4 2012/12/19 17:12:11 giovanni Exp $
---- zenmap/install_scripts/unix/su-to-zenmap.sh.orig Sun Aug 19 22:11:06 2012
-+++ zenmap/install_scripts/unix/su-to-zenmap.sh Fri Nov 30 12:43:43 2012
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- #this code is bassed off of the debian su-to-root command
- #Joost Witteveen <[email protected]>
- #Morten Brix Pedersen
-@@ -18,13 +18,13 @@ else
- if test "X$KDE_FULL_SESSION" = "Xtrue" ; then
- if which kdesu >/dev/null 2>&1 ; then
- SU_TO_ROOT_X=kdesu
-- elif test -x /usr/lib/kde4/libexec/kdesu ; then
-+ elif test -x /usr/local/lib/kde4/libexec/kdesu ; then
- SU_TO_ROOT_X=kde4su
- fi;
- fi;
- elif which kdesu >/dev/null 2>&1 ; then
- SU_TO_ROOT_X=kdesu
-- elif test -x /usr/lib/kde4/libexec/kdesu ; then
-+ elif test -x /usr/local/lib/kde4/libexec/kdesu ; then
- SU_TO_ROOT_X=kde4su
- elif which ktsuss >/dev/null 2>&1 ; then
- SU_TO_ROOT_X=ktsuss
Index: pkg/PFRAG.shared-main
===================================================================
RCS file: /cvs/ports/net/nmap/pkg/PFRAG.shared-main,v
retrieving revision 1.11
diff -u -p -u -p -r1.11 PFRAG.shared-main
--- pkg/PFRAG.shared-main 19 Dec 2012 17:12:12 -0000 1.11
+++ pkg/PFRAG.shared-main 30 Jul 2013 09:08:20 -0000
@@ -24,17 +24,20 @@ share/nmap/nselib/data/http-fingerprints
share/nmap/nselib/data/http-folders.txt
share/nmap/nselib/data/http-sql-errors.lst
share/nmap/nselib/data/http-web-files-extensions.lst
+share/nmap/nselib/data/ike-fingerprints.lua
share/nmap/nselib/data/jdwp-class/
share/nmap/nselib/data/jdwp-class/JDWPExecCmd.class
share/nmap/nselib/data/jdwp-class/JDWPExecCmd.java
share/nmap/nselib/data/jdwp-class/JDWPSystemInfo.class
share/nmap/nselib/data/jdwp-class/JDWPSystemInfo.java
share/nmap/nselib/data/jdwp-class/README.txt
+share/nmap/nselib/data/mgroupnames.db
share/nmap/nselib/data/mysql-cis.audit
share/nmap/nselib/data/oracle-default-accounts.lst
share/nmap/nselib/data/oracle-sids
share/nmap/nselib/data/packetdecoders.lua
share/nmap/nselib/data/passwords.lst
+share/nmap/nselib/data/pixel.gif
share/nmap/nselib/data/psexec/
share/nmap/nselib/data/psexec/README
share/nmap/nselib/data/psexec/backdoor.lua
@@ -70,6 +73,7 @@ share/nmap/nselib/gps.lua
share/nmap/nselib/http.lua
share/nmap/nselib/httpspider.lua
share/nmap/nselib/iax2.lua
+share/nmap/nselib/ike.lua
share/nmap/nselib/imap.lua
share/nmap/nselib/informix.lua
share/nmap/nselib/ipOps.lua
@@ -269,7 +273,9 @@ share/nmap/scripts/hbase-master-info.nse
share/nmap/scripts/hbase-region-info.nse
share/nmap/scripts/hddtemp-info.nse
share/nmap/scripts/hostmap-bfk.nse
+share/nmap/scripts/hostmap-ip2hosts.nse
share/nmap/scripts/hostmap-robtex.nse
+share/nmap/scripts/http-adobe-coldfusion-apsa1301.nse
share/nmap/scripts/http-affiliate-id.nse
share/nmap/scripts/http-apache-negotiation.nse
share/nmap/scripts/http-auth-finder.nse
@@ -281,6 +287,8 @@ share/nmap/scripts/http-barracuda-dir-tr
share/nmap/scripts/http-brute.nse
share/nmap/scripts/http-cakephp-version.nse
share/nmap/scripts/http-chrono.nse
+share/nmap/scripts/http-coldfusion-subzero.nse
+share/nmap/scripts/http-comments-displayer.nse
share/nmap/scripts/http-config-backup.nse
share/nmap/scripts/http-cors.nse
share/nmap/scripts/http-date.nse
@@ -292,6 +300,7 @@ share/nmap/scripts/http-email-harvest.ns
share/nmap/scripts/http-enum.nse
share/nmap/scripts/http-exif-spider.nse
share/nmap/scripts/http-favicon.nse
+share/nmap/scripts/http-fileupload-exploiter.nse
share/nmap/scripts/http-form-brute.nse
share/nmap/scripts/http-form-fuzzer.nse
share/nmap/scripts/http-frontpage-login.nse
@@ -315,6 +324,7 @@ share/nmap/scripts/http-open-proxy.nse
share/nmap/scripts/http-open-redirect.nse
share/nmap/scripts/http-passwd.nse
share/nmap/scripts/http-php-version.nse
+share/nmap/scripts/http-phpmyadmin-dir-traversal.nse
share/nmap/scripts/http-phpself-xss.nse
share/nmap/scripts/http-proxy-brute.nse
share/nmap/scripts/http-put.nse
@@ -327,6 +337,7 @@ share/nmap/scripts/http-sitemap-generato
share/nmap/scripts/http-slowloris-check.nse
share/nmap/scripts/http-slowloris.nse
share/nmap/scripts/http-sql-injection.nse
+share/nmap/scripts/http-stored-xss.nse
share/nmap/scripts/http-title.nse
share/nmap/scripts/http-tplink-dir-traversal.nse
share/nmap/scripts/http-trace.nse
@@ -343,6 +354,7 @@ share/nmap/scripts/http-vuln-cve2010-286
share/nmap/scripts/http-vuln-cve2011-3192.nse
share/nmap/scripts/http-vuln-cve2011-3368.nse
share/nmap/scripts/http-vuln-cve2012-1823.nse
+share/nmap/scripts/http-vuln-cve2013-0156.nse
share/nmap/scripts/http-waf-detect.nse
share/nmap/scripts/http-waf-fingerprint.nse
share/nmap/scripts/http-wordpress-brute.nse
@@ -351,6 +363,7 @@ share/nmap/scripts/http-wordpress-plugin
share/nmap/scripts/iax2-brute.nse
share/nmap/scripts/iax2-version.nse
share/nmap/scripts/icap-info.nse
+share/nmap/scripts/ike-version.nse
share/nmap/scripts/imap-brute.nse
share/nmap/scripts/imap-capabilities.nse
share/nmap/scripts/informix-brute.nse
@@ -411,11 +424,13 @@ share/nmap/scripts/ms-sql-tables.nse
share/nmap/scripts/ms-sql-xp-cmdshell.nse
share/nmap/scripts/msrpc-enum.nse
share/nmap/scripts/mtrace.nse
+share/nmap/scripts/murmur-version.nse
share/nmap/scripts/mysql-audit.nse
share/nmap/scripts/mysql-brute.nse
share/nmap/scripts/mysql-databases.nse
share/nmap/scripts/mysql-dump-hashes.nse
share/nmap/scripts/mysql-empty-password.nse
+share/nmap/scripts/mysql-enum.nse
share/nmap/scripts/mysql-info.nse
share/nmap/scripts/mysql-query.nse
share/nmap/scripts/mysql-users.nse
@@ -553,6 +568,7 @@ share/nmap/scripts/targets-ipv6-multicas
share/nmap/scripts/targets-ipv6-multicast-slaac.nse
share/nmap/scripts/targets-sniffer.nse
share/nmap/scripts/targets-traceroute.nse
+share/nmap/scripts/teamspeak2-version.nse
share/nmap/scripts/telnet-brute.nse
share/nmap/scripts/telnet-encryption.nse
share/nmap/scripts/tftp-enum.nse
@@ -561,6 +577,7 @@ share/nmap/scripts/traceroute-geolocatio
share/nmap/scripts/unusual-port.nse
share/nmap/scripts/upnp-info.nse
share/nmap/scripts/url-snarf.nse
+share/nmap/scripts/ventrilo-info.nse
share/nmap/scripts/versant-info.nse
share/nmap/scripts/vmauthd-brute.nse
share/nmap/scripts/vnc-brute.nse
Index: pkg/PLIST-zenmap
===================================================================
RCS file: /cvs/ports/net/nmap/pkg/PLIST-zenmap,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 PLIST-zenmap
--- pkg/PLIST-zenmap 19 Dec 2012 17:12:12 -0000 1.13
+++ pkg/PLIST-zenmap 30 Jul 2013 09:08:20 -0000
@@ -28,6 +28,9 @@ share/zenmap/locale/it/LC_MESSAGES/zenma
share/zenmap/locale/ja/
share/zenmap/locale/ja/LC_MESSAGES/
share/zenmap/locale/ja/LC_MESSAGES/zenmap.mo
+share/zenmap/locale/pl/
+share/zenmap/locale/pl/LC_MESSAGES/
+share/zenmap/locale/pl/LC_MESSAGES/zenmap.mo
share/zenmap/locale/pt_BR/
share/zenmap/locale/pt_BR/LC_MESSAGES/
share/zenmap/locale/pt_BR/LC_MESSAGES/zenmap.mo