pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

dsniff: Import dsniff-2.3nb15 as wip/dsniff (from security/dsniff)



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Mon Aug 27 13:17:02 2018 +0200
Changeset:	c9e0172101015dd00e77e724de59a2948ec246de

Modified Files:
	Makefile
Added Files:
	dsniff/DESCR
	dsniff/Makefile
	dsniff/Makefile.common
	dsniff/PLIST
	dsniff/distinfo
	dsniff/patches/patch-aa
	dsniff/patches/patch-ab
	dsniff/patches/patch-ac
	dsniff/patches/patch-ad
	dsniff/patches/patch-ae
	dsniff/patches/patch-ba
	dsniff/patches/patch-bb
	dsniff/patches/patch-bc
	dsniff/patches/patch-bd
	dsniff/patches/patch-be
	dsniff/patches/patch-bf
	dsniff/patches/patch-bg
	dsniff/patches/patch-bh
	dsniff/patches/patch-bi
	dsniff/patches/patch-bj
	dsniff/patches/patch-bk
	dsniff/patches/patch-bl
	dsniff/patches/patch-sshmitm.c
	dsniff/patches/patch-webmitm.c

Log Message:
dsniff: Import dsniff-2.3nb15 as wip/dsniff (from security/dsniff)

Password sniffer, plus sniffing tools for penetration testing.

This package contains the X11 tool webspy.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c9e0172101015dd00e77e724de59a2948ec246de

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                       |  1 +
 dsniff/DESCR                   |  3 ++
 dsniff/Makefile                | 24 ++++++++++++++++
 dsniff/Makefile.common         | 32 +++++++++++++++++++++
 dsniff/PLIST                   |  3 ++
 dsniff/distinfo                | 25 +++++++++++++++++
 dsniff/patches/patch-aa        | 12 ++++++++
 dsniff/patches/patch-ab        | 29 +++++++++++++++++++
 dsniff/patches/patch-ac        | 33 ++++++++++++++++++++++
 dsniff/patches/patch-ad        | 18 ++++++++++++
 dsniff/patches/patch-ae        | 12 ++++++++
 dsniff/patches/patch-ba        | 24 ++++++++++++++++
 dsniff/patches/patch-bb        | 63 ++++++++++++++++++++++++++++++++++++++++++
 dsniff/patches/patch-bc        | 23 +++++++++++++++
 dsniff/patches/patch-bd        | 60 ++++++++++++++++++++++++++++++++++++++++
 dsniff/patches/patch-be        | 23 +++++++++++++++
 dsniff/patches/patch-bf        | 58 ++++++++++++++++++++++++++++++++++++++
 dsniff/patches/patch-bg        | 23 +++++++++++++++
 dsniff/patches/patch-bh        | 60 ++++++++++++++++++++++++++++++++++++++++
 dsniff/patches/patch-bi        | 24 ++++++++++++++++
 dsniff/patches/patch-bj        | 57 ++++++++++++++++++++++++++++++++++++++
 dsniff/patches/patch-bk        | 23 +++++++++++++++
 dsniff/patches/patch-bl        | 45 ++++++++++++++++++++++++++++++
 dsniff/patches/patch-sshmitm.c | 12 ++++++++
 dsniff/patches/patch-webmitm.c | 12 ++++++++
 25 files changed, 699 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 0ed6067ecf..0ca6c9057f 100644
--- a/Makefile
+++ b/Makefile
@@ -616,6 +616,7 @@ SUBDIR+=	drpython
 SUBDIR+=	drumpiler
 SUBDIR+=	ds2
 SUBDIR+=	dscan
+SUBDIR+=	dsniff
 SUBDIR+=	dspdfviewer
 SUBDIR+=	dssi
 SUBDIR+=	dtc
diff --git a/dsniff/DESCR b/dsniff/DESCR
new file mode 100644
index 0000000000..96327d9031
--- /dev/null
+++ b/dsniff/DESCR
@@ -0,0 +1,3 @@
+Password sniffer, plus sniffing tools for penetration testing.
+
+This package contains the X11 tool webspy.
diff --git a/dsniff/Makefile b/dsniff/Makefile
new file mode 100644
index 0000000000..647aee87f1
--- /dev/null
+++ b/dsniff/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.41 2016/04/18 08:34:35 leot Exp $
+
+.include "Makefile.common"
+
+PKGREVISION=	15
+COMMENT=	Password sniffer (webspy)
+
+DEPENDS+=	dsniff-nox11-[0-9]*:../../security/dsniff-nox11
+
+BUILD_TARGET=	libmissing.a webspy
+
+INSTALLATION_DIRS+=	sbin ${PKGMANDIR}/man8
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/webspy ${DESTDIR}${PREFIX}/sbin
+	${INSTALL_MAN} ${WRKSRC}/webspy.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+
+BUILDLINK_DEPMETHOD.libXt?=	build
+
+.include "../../x11/libSM/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXmu/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/dsniff/Makefile.common b/dsniff/Makefile.common
new file mode 100644
index 0000000000..5a9007c92f
--- /dev/null
+++ b/dsniff/Makefile.common
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile.common,v 1.12 2017/08/16 20:21:14 wiz Exp $
+#
+# used by security/dsniff/Makefile
+# used by security/dsniff-nox11/Makefile
+
+DISTNAME=	dsniff-${VERS}
+VERS=		2.3
+CATEGORIES=	security
+MASTER_SITES+=	https://monkey.org/~dugsong/dsniff/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://monkey.org/~dugsong/dsniff/
+LICENSE=	modified-bsd
+
+GNU_CONFIGURE=	yes
+MAKE_JOBS_SAFE=	no
+
+PATCHDIR=	${.CURDIR}/../../security/dsniff/patches
+DISTINFO_FILE=	${.CURDIR}/../../security/dsniff/distinfo
+
+SUBST_CLASSES+=		conf
+SUBST_STAGE.conf=	pre-configure
+SUBST_FILES.conf=	configure
+SUBST_SED.conf=		-e "s|libnet-config|libnet10-config|g"
+SUBST_SED.conf+=	-e "s|@@LN_INC@@|${BUILDLINK_PREFIX.libnet10}/include/libnet10|g"
+SUBST_SED.conf+=	-e "s|@@LN_LIB@@|${BUILDLINK_PREFIX.libnet10}/lib/libnet10|g"
+SUBST_MESSAGE.conf=	Fixing configuration script.
+
+.include "../../devel/libnet10/buildlink3.mk"
+.include "../../net/libnids/buildlink3.mk"
+.include "../../net/libpcap/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
diff --git a/dsniff/PLIST b/dsniff/PLIST
new file mode 100644
index 0000000000..c170d9058a
--- /dev/null
+++ b/dsniff/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.2 2005/03/22 01:07:07 wiz Exp $
+man/man8/webspy.8
+sbin/webspy
diff --git a/dsniff/distinfo b/dsniff/distinfo
new file mode 100644
index 0000000000..dd67a47a24
--- /dev/null
+++ b/dsniff/distinfo
@@ -0,0 +1,25 @@
+$NetBSD: distinfo,v 1.12 2016/04/18 08:34:35 leot Exp $
+
+SHA1 (dsniff-2.3.tar.gz) = 671a1df823ab0657fc95e79112924a57281e9c3b
+RMD160 (dsniff-2.3.tar.gz) = 89dad0259e90acef30a7aa5f3471de3aaeb06147
+SHA512 (dsniff-2.3.tar.gz) = d27b2bf901cd7e2dcef0d6170318d131ba57d4881c0b85f24ee3de9581c41841eab4363cc8ea0dd6d7dcd1c27dcb61d054dfca964b5674301d8c7a173a9f113d
+Size (dsniff-2.3.tar.gz) = 126797 bytes
+SHA1 (patch-aa) = b3798143fa0a662870c3144f136773d575c54364
+SHA1 (patch-ab) = 6385da7139dcb11ea29ffba468e7fac260b61b44
+SHA1 (patch-ac) = 1730b92ecd421e396781e2e4ba9b7a7d9b90d992
+SHA1 (patch-ad) = cab09e1b1a61fd6a3fa96c24fff3cd1519146a3e
+SHA1 (patch-ae) = e54a7be65c2e1d236b2427d216e1184ff6046a0b
+SHA1 (patch-ba) = 5f774dcb904681f123fa9cae25ea4d88afee6bb6
+SHA1 (patch-bb) = 58026805c5a8f91f7fa80a94ddbea0b8fadfadd5
+SHA1 (patch-bc) = 6d27957bd1d10b66428dbea214b0463fa8321bef
+SHA1 (patch-bd) = dc0f17dd287327ff5105e91c5bfa8b2390841fe2
+SHA1 (patch-be) = 878d5e81909790d852db442ec0bb57fb161a73a4
+SHA1 (patch-bf) = c1bd7f1794d6f8b9fec6cf1d6b24e75ed32c0616
+SHA1 (patch-bg) = 6888b68ae38b32a2fd635f5b08c7c637033a28b5
+SHA1 (patch-bh) = 1e4bee85e6d289c011632ef84d460e46746287c9
+SHA1 (patch-bi) = 47c6b0e3682af9ee3b212b0d0800d9a74037df30
+SHA1 (patch-bj) = b6d45af26058a221cb68d72c45e7358c1ef894c0
+SHA1 (patch-bk) = 3a36f7a11a5590daea9b1cf7c8d7772a88ff2a18
+SHA1 (patch-bl) = add5db6023f9e76e269e953eb95ff5b808f650ab
+SHA1 (patch-sshmitm.c) = b1b219739c05290eb2635ae17175966eb2150b68
+SHA1 (patch-webmitm.c) = 426f4eb0e6b704b487e032f3a772766a0f1de061
diff --git a/dsniff/patches/patch-aa b/dsniff/patches/patch-aa
new file mode 100644
index 0000000000..868852d229
--- /dev/null
+++ b/dsniff/patches/patch-aa
@@ -0,0 +1,12 @@
+$NetBSD: patch-aa,v 1.2 2016/04/18 08:34:35 leot Exp $
+
+--- pcaputil.c.orig	2000-11-14 15:51:08.000000000 +0000
++++ pcaputil.c
+@@ -14,6 +14,7 @@
+ #include <string.h>
+ #include <err.h>
+ #include <pcap.h>
++#undef BSD
+ #ifdef BSD
+ #include <pcap-int.h>
+ #endif
diff --git a/dsniff/patches/patch-ab b/dsniff/patches/patch-ab
new file mode 100644
index 0000000000..1b3fe14f9f
--- /dev/null
+++ b/dsniff/patches/patch-ab
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.2 2005/12/11 18:26:03 salo Exp $
+
+--- sshcrypto.c.orig	2000-11-28 22:23:28.000000000 +0100
++++ sshcrypto.c
+@@ -14,6 +14,8 @@
+ 
+ #include <sys/types.h>
+ #include <openssl/ssl.h>
++#include <openssl/blowfish.h>
++#include <openssl/des.h>
+ 
+ #include <err.h>
+ #include <stdio.h>
+@@ -21,6 +23,15 @@
+ 
+ #include "sshcrypto.h"
+ 
++#if OPENSSL_VERSION_NUMBER > 0x00907000L
++#define des_cblock		DES_cblock
++#define des_key_schedule	DES_key_schedule
++
++#define des_set_key(key,schedule)		DES_set_key(key,&schedule)
++#define des_ncbc_encrypt(input,output,length,schedule,ivec,enc)	\
++						DES_ncbc_encrypt(input,output,length,&schedule,ivec,enc)
++#endif
++
+ struct blowfish_state {
+ 	struct bf_key_st	key;
+ 	u_char			iv[8];
diff --git a/dsniff/patches/patch-ac b/dsniff/patches/patch-ac
new file mode 100644
index 0000000000..5a897e0958
--- /dev/null
+++ b/dsniff/patches/patch-ac
@@ -0,0 +1,33 @@
+$NetBSD: patch-ac,v 1.3 2016/04/18 08:34:35 leot Exp $
+
+--- arp.c.orig	2000-11-14 15:51:03.000000000 +0000
++++ arp.c
+@@ -17,7 +17,7 @@
+ #include <sys/sysctl.h>
+ #include <net/if_dl.h>
+ #include <net/route.h>
+-#ifdef __FreeBSD__	/* XXX */
++#if defined(__FreeBSD__) || defined(__DragonFly__)	/* XXX */
+ #define ether_addr_octet octet
+ #endif
+ #else /* !BSD */
+@@ -32,6 +32,7 @@
+ #include <netinet/if_ether.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ 
+ #ifdef BSD
+@@ -51,7 +52,11 @@ arp_cache_lookup(in_addr_t ip, struct et
+ 	mib[2] = 0;
+ 	mib[3] = AF_INET;
+ 	mib[4] = NET_RT_FLAGS;
++#ifdef RTF_LLDATA
++	mib[5] = RTF_LLDATA;
++#else
+ 	mib[5] = RTF_LLINFO;
++#endif
+ 	
+ 	if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0)
+ 		return (-1);
diff --git a/dsniff/patches/patch-ad b/dsniff/patches/patch-ad
new file mode 100644
index 0000000000..6224a1f586
--- /dev/null
+++ b/dsniff/patches/patch-ad
@@ -0,0 +1,18 @@
+$NetBSD: patch-ad,v 1.1 2007/02/18 18:56:13 adrianp Exp $
+
+--- configure.orig	2000-12-03 04:35:46.000000000 +0000
++++ configure
+@@ -3083,10 +3083,10 @@ if test "${with_libnet+set}" = set; then
+      ;;
+   esac 
+ else
+-   if test -f ${prefix}/include/libnet.h; then
++   if test -f @@LN_INC@@/libnet.h; then
+      CFLAGS="$CFLAGS `${prefix}/bin/libnet-config --defines`"
+-     LNETINC="-I${prefix}/include"
+-     LNETLIB="-L${prefix}/lib -lnet"
++     LNETINC="-I@@LN_INC@@"
++     LNETLIB="-L@@LN_LIB@@ -lnet"
+   elif test -f /usr/include/libnet.h; then
+      CFLAGS="$CFLAGS `libnet-config --defines`"
+      LNETLIB="-lnet"
diff --git a/dsniff/patches/patch-ae b/dsniff/patches/patch-ae
new file mode 100644
index 0000000000..671a6cfe90
--- /dev/null
+++ b/dsniff/patches/patch-ae
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.1 2008/10/01 08:43:09 apb Exp $
+
+--- buf.c.orig	2000-11-28 09:45:07.000000000 +0200
++++ buf.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <ctype.h>
+ #include <err.h>
diff --git a/dsniff/patches/patch-ba b/dsniff/patches/patch-ba
new file mode 100644
index 0000000000..ccca9f851a
--- /dev/null
+++ b/dsniff/patches/patch-ba
@@ -0,0 +1,24 @@
+$NetBSD: patch-ba,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/dsniff.8 dsniff-2.3/dsniff.8
+--- dsniff.8.orig	2000-12-15 16:05:36.000000000 +0000
++++ dsniff.8	2009-05-06 23:23:49.000000000 +0100
+@@ -10,7 +10,7 @@
+ .nf
+ .fi
+ \fBdsniff\fR [\fB-c\fR] [\fB-d\fR] [\fB-m\fR] [\fB-n\fR] [\fB-i
+-\fIinterface\fR] [\fB-s \fIsnaplen\fR] [\fB-f \fIservices\fR]
++\fIinterface\fR | \fB-p \fIpcapfile\fR] [\fB-s \fIsnaplen\fR] [\fB-f \fIservices\fR]
+ [\fB-t \fItrigger[,...]\fR]]
+ [\fB-r\fR|\fB-w\fR \fIsavefile\fR] [\fIexpression\fR]
+ .SH DESCRIPTION
+@@ -45,6 +45,9 @@
+ Do not resolve IP addresses to hostnames.
+ .IP "\fB-i \fIinterface\fR"
+ Specify the interface to listen on.
++.IP "\fB-p \fIpcapfile\fR"
++Rather than processing the contents of packets observed upon the network 
++process the given PCAP capture file.
+ .IP "\fB-s \fIsnaplen\fR"
+ Analyze at most the first \fIsnaplen\fR bytes of each TCP connection,
+ rather than the default of 1024.
diff --git a/dsniff/patches/patch-bb b/dsniff/patches/patch-bb
new file mode 100644
index 0000000000..0f4a8a9a94
--- /dev/null
+++ b/dsniff/patches/patch-bb
@@ -0,0 +1,63 @@
+$NetBSD: patch-bb,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/dsniff.c dsniff-2.3/dsniff.c
+--- dsniff.c.orig	2000-12-01 21:27:15.000000000 +0000
++++ dsniff.c	2009-05-06 23:23:49.000000000 +0100
+@@ -44,8 +44,9 @@
+ usage(void)
+ {
+ 	fprintf(stderr, "Version: " VERSION "\n"
+-		"Usage: dsniff [-cdmn] [-i interface] [-s snaplen] [-f services]\n"
+-		"              [-t trigger[,...]] [-r|-w savefile] [expression]\n");
++		"Usage: dsniff [-cdmn] [-i interface | -p pcapfile] [-s snaplen]\n"
++		"              [-f services] [-t trigger[,...]] [-r|-w savefile]\n"
++		"              [expression]\n");
+ 	exit(1);
+ }
+ 
+@@ -75,7 +76,7 @@
+ 
+ 	services = savefile = triggers = NULL;
+ 	
+-	while ((c = getopt(argc, argv, "cdf:i:mnr:s:t:w:h?V")) != -1) {
++	while ((c = getopt(argc, argv, "cdf:i:mnp:r:s:t:w:h?V")) != -1) {
+ 		switch (c) {
+ 		case 'c':
+ 			Opt_client = 1;
+@@ -95,6 +96,9 @@
+ 		case 'n':
+ 			Opt_dns = 0;
+ 			break;
++		case 'p':
++			nids_params.filename = optarg;
++			break;
+ 		case 'r':
+ 			Opt_read = 1;
+ 			savefile = optarg;
+@@ -164,10 +168,23 @@
+ 	else nids_register_tcp(trigger_tcp);
+ 	
+ 	if (nids_params.pcap_filter != NULL) {
+-		warnx("listening on %s [%s]", nids_params.device,
+-		      nids_params.pcap_filter);
++		if (nids_params.filename == NULL) {
++			warnx("listening on %s [%s]", nids_params.device,
++		        nids_params.pcap_filter);
++		}
++		else {
++			warnx("using %s [%s]", nids_params.filename,
++		        nids_params.pcap_filter);
++		}
++	}
++	else {
++		if (nids_params.filename == NULL) {
++			warnx("listening on %s", nids_params.device);
++		}
++		else {
++			warnx("using %s", nids_params.filename);
++		}
+ 	}
+-	else warnx("listening on %s", nids_params.device);
+ 	
+ 	nids_run();
+ 	
diff --git a/dsniff/patches/patch-bc b/dsniff/patches/patch-bc
new file mode 100644
index 0000000000..989224b188
--- /dev/null
+++ b/dsniff/patches/patch-bc
@@ -0,0 +1,23 @@
+$NetBSD: patch-bc,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/filesnarf.8 dsniff-2.3/filesnarf.8
+--- filesnarf.8.orig	2000-11-19 06:23:33.000000000 +0000
++++ filesnarf.8	2009-05-06 23:23:49.000000000 +0100
+@@ -9,7 +9,7 @@
+ .na
+ .nf
+ .fi
+-\fBfilesnarf\fR [\fB-i \fIinterface\fR] [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
++\fBfilesnarf\fR [\fB-i \fIinterface\fR | \fB-p \fIpcapfile\fR] [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
+ .SH DESCRIPTION
+ .ad
+ .fi
+@@ -18,6 +18,8 @@
+ .SH OPTIONS
+ .IP "\fB-i \fIinterface\fR"
+ Specify the interface to listen on.
++.IP "\fB-p \fIpcapfile\fR"
++Process packets from the specified PCAP capture file instead of the network.
+ .IP \fB-v\fR
+ "Versus" mode. Invert the sense of matching, to select non-matching
+ files.
diff --git a/dsniff/patches/patch-bd b/dsniff/patches/patch-bd
new file mode 100644
index 0000000000..4b51a0e384
--- /dev/null
+++ b/dsniff/patches/patch-bd
@@ -0,0 +1,60 @@
+$NetBSD: patch-bd,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/filesnarf.c dsniff-2.3/filesnarf.c
+--- filesnarf.c.orig	2000-12-15 20:16:58.000000000 +0000
++++ filesnarf.c	2009-05-06 23:23:49.000000000 +0100
+@@ -51,7 +51,7 @@
+ usage(void)
+ {
+ 	fprintf(stderr, "Version: " VERSION "\n"
+-		"Usage: filesnarf [-i interface] [[-v] pattern [expression]]\n");
++		"Usage: filesnarf [-i interface | -p pcapfile] [[-v] pattern [expression]]\n");
+ 	exit(1);
+ }
+ 
+@@ -462,11 +462,14 @@
+ {
+ 	int c;
+ 
+-	while ((c = getopt(argc, argv, "i:vh?V")) != -1) {
++	while ((c = getopt(argc, argv, "i:p:vh?V")) != -1) {
+ 		switch (c) {
+ 		case 'i':
+ 			nids_params.device = optarg;
+ 			break;
++		case 'p':
++			nids_params.filename = optarg;
++			break;
+ 		case 'v':
+ 			Opt_invert = 1;
+ 			break;
+@@ -496,11 +499,24 @@
+ 	nids_register_ip(decode_udp_nfs);
+ 	nids_register_tcp(decode_tcp_nfs);
+ 
+-	if (nids_params.pcap_filter != NULL) {
+-		warnx("listening on %s [%s]", nids_params.device,
+-		      nids_params.pcap_filter);
+-	}
+-	else warnx("listening on %s", nids_params.device);
++        if (nids_params.pcap_filter != NULL) {
++                if (nids_params.filename == NULL) {
++                        warnx("listening on %s [%s]", nids_params.device,
++                              nids_params.pcap_filter);
++                }
++                else {
++                        warnx("using %s [%s]", nids_params.filename,
++                              nids_params.pcap_filter);
++                }
++        }
++        else {
++                if (nids_params.filename == NULL) {
++                        warnx("listening on %s", nids_params.device);
++                }
++                else {
++                        warnx("using %s", nids_params.filename);
++                }
++        }
+ 
+ 	nids_run();
+ 
diff --git a/dsniff/patches/patch-be b/dsniff/patches/patch-be
new file mode 100644
index 0000000000..1533d3146f
--- /dev/null
+++ b/dsniff/patches/patch-be
@@ -0,0 +1,23 @@
+$NetBSD: patch-be,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/mailsnarf.8 dsniff-2.3/mailsnarf.8
+--- mailsnarf.8.orig	2000-11-19 06:09:28.000000000 +0000
++++ mailsnarf.8	2009-05-06 23:23:49.000000000 +0100
+@@ -9,7 +9,7 @@
+ .na
+ .nf
+ .fi
+-\fBmailsnarf\fR [\fB-i \fIinterface\fR] [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
++\fBmailsnarf\fR [\fB-i \fIinterface\fR | \fB-p \fIpcapfile\fR] [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
+ .SH DESCRIPTION
+ .ad
+ .fi
+@@ -19,6 +19,8 @@
+ .SH OPTIONS
+ .IP "\fB-i \fIinterface\fR"
+ Specify the interface to listen on.
++.IP "\fB-p \fIpcapfile\fR"
++Process packets from the specified PCAP capture file instead of the network.
+ .IP \fB-v\fR
+ "Versus" mode. Invert the sense of matching, to select non-matching
+ messages.
diff --git a/dsniff/patches/patch-bf b/dsniff/patches/patch-bf
new file mode 100644
index 0000000000..ff53dd53ec
--- /dev/null
+++ b/dsniff/patches/patch-bf
@@ -0,0 +1,58 @@
+$NetBSD: patch-bf,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/mailsnarf.c dsniff-2.3/mailsnarf.c
+--- mailsnarf.c.orig	2000-11-19 19:39:41.000000000 +0000
++++ mailsnarf.c	2009-05-06 23:23:49.000000000 +0100
+@@ -57,7 +57,7 @@
+ usage(void)
+ {
+ 	fprintf(stderr, "Version: " VERSION "\n"
+-		"Usage: mailsnarf [-i interface] [[-v] pattern [expression]]\n");
++		"Usage: mailsnarf [-i interface | -p pcapfile] [[-v] pattern [expression]]\n");
+ 	exit(1);
+ }
+ 
+@@ -340,11 +340,14 @@
+ {
+ 	int c;
+ 	
+-	while ((c = getopt(argc, argv, "i:vh?V")) != -1) {
++	while ((c = getopt(argc, argv, "i:p:vh?V")) != -1) {
+ 		switch (c) {
+ 		case 'i':
+ 			nids_params.device = optarg;
+ 			break;
++                case 'p':
++                        nids_params.filename = optarg;
++                        break;
+ 		case 'v':
+ 			Opt_invert = 1;
+ 			break;
+@@ -374,10 +377,23 @@
+ 	nids_register_tcp(sniff_pop_session);
+ 
+ 	if (nids_params.pcap_filter != NULL) {
+-		warnx("listening on %s [%s]", nids_params.device,
+-		      nids_params.pcap_filter);
+-	}
+-	else warnx("listening on %s", nids_params.device);
++                if (nids_params.filename == NULL) {
++		        warnx("listening on %s [%s]", nids_params.device,
++		              nids_params.pcap_filter);
++                }
++                else {
++		        warnx("using %s [%s]", nids_params.filename,
++		              nids_params.pcap_filter);
++                }
++	}
++	else {
++                if (nids_params.filename == NULL) {
++                    warnx("listening on %s", nids_params.device);
++                }
++                else {
++                    warnx("using %s", nids_params.filename);
++                }
++        }
+ 	
+ 	nids_run();
+ 	
diff --git a/dsniff/patches/patch-bg b/dsniff/patches/patch-bg
new file mode 100644
index 0000000000..4d7fb43b51
--- /dev/null
+++ b/dsniff/patches/patch-bg
@@ -0,0 +1,23 @@
+$NetBSD: patch-bg,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/msgsnarf.8 dsniff-2.3/msgsnarf.8
+--- msgsnarf.8.orig	2000-11-19 06:10:50.000000000 +0000
++++ msgsnarf.8	2009-05-06 23:23:49.000000000 +0100
+@@ -9,7 +9,7 @@
+ .na
+ .nf
+ .fi
+-\fBmsgsnarf\fR [\fB-i \fIinterface\fR] [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
++\fBmsgsnarf\fR [\fB-i \fIinterface\fR | \fB-p \fIpcapfile\fR] [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
+ .SH DESCRIPTION
+ .ad
+ .fi
+@@ -19,6 +19,8 @@
+ .SH OPTIONS
+ .IP "\fB-i \fIinterface\fR"
+ Specify the interface to listen on.
++.IP "\fB-p \fIpcapfile\fR"
++Process packets from the specified PCAP capture file instead of the network.
+ .IP \fB-v\fR
+ "Versus" mode. Invert the sense of matching, to select non-matching
+ messages.
diff --git a/dsniff/patches/patch-bh b/dsniff/patches/patch-bh
new file mode 100644
index 0000000000..29e6712ac0
--- /dev/null
+++ b/dsniff/patches/patch-bh
@@ -0,0 +1,60 @@
+$NetBSD: patch-bh,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/msgsnarf.c dsniff-2.3/msgsnarf.c
+--- msgsnarf.c.orig	2000-12-15 20:12:19.000000000 +0000
++++ msgsnarf.c	2009-05-06 23:23:49.000000000 +0100
+@@ -41,7 +41,7 @@
+ usage(void)
+ {
+ 	fprintf(stderr, "Version: " VERSION "\n"
+-		"Usage: msgsnarf [-i interface] [[-v] pattern [expression]]\n");
++		"Usage: msgsnarf [-i interface | -p pcapfile] [[-v] pattern [expression]]\n");
+ 	exit(1);
+ }
+ 
+@@ -627,11 +627,14 @@
+ {
+ 	int c;
+ 	
+-	while ((c = getopt(argc, argv, "i:hv?V")) != -1) {
++	while ((c = getopt(argc, argv, "i:p:hv?V")) != -1) {
+ 		switch (c) {
+ 		case 'i':
+ 			nids_params.device = optarg;
+ 			break;
++		case 'p':
++			nids_params.filename = optarg;
++			break;
+ 		case 'v':
+ 			Opt_invert = 1;
+ 			break;
+@@ -660,11 +663,24 @@
+ 	
+ 	nids_register_tcp(sniff_msgs);
+ 
+-	if (nids_params.pcap_filter != NULL) {
+-		warnx("listening on %s [%s]", nids_params.device,
+-		      nids_params.pcap_filter);
+-	}
+-	else warnx("listening on %s", nids_params.device);
++        if (nids_params.pcap_filter != NULL) {
++                if (nids_params.filename == NULL) {
++                        warnx("listening on %s [%s]", nids_params.device,
++                              nids_params.pcap_filter);
++                }
++                else {
++                        warnx("using %s [%s]", nids_params.filename,
++                              nids_params.pcap_filter);
++                }
++        }
++        else {
++                if (nids_params.filename == NULL) {
++                    warnx("listening on %s", nids_params.device);
++                }
++                else {
++                    warnx("using %s", nids_params.filename);
++                }
++        }
+ 
+ 	nids_run();
+ 	
diff --git a/dsniff/patches/patch-bi b/dsniff/patches/patch-bi
new file mode 100644
index 0000000000..421cdf0ef9
--- /dev/null
+++ b/dsniff/patches/patch-bi
@@ -0,0 +1,24 @@
+$NetBSD: patch-bi,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/urlsnarf.8 dsniff-2.3/urlsnarf.8
+--- urlsnarf.8.orig	2000-11-19 06:24:51.000000000 +0000
++++ urlsnarf.8	2009-05-06 23:24:07.000000000 +0100
+@@ -9,7 +9,7 @@
+ .na
+ .nf
+ .fi
+-\fBurlsnarf\fR [\fB-n\fR] [\fB-i \fIinterface\fR]  [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
++\fBurlsnarf\fR [\fB-n\fR] [\fB-i \fIinterface\fR | \fB-p \fIpcapfile\fR]  [[\fB-v\fR] \fIpattern [\fIexpression\fR]]
+ .SH DESCRIPTION
+ .ad
+ .fi
+@@ -21,6 +21,9 @@
+ .IP \fB-n\fR
+ Do not resolve IP addresses to hostnames.
+ .IP "\fB-i \fIinterface\fR"
++Specify the interface to listen on.
++.IP "\fB-p \fIpcapfile\fR"
++Process packets from the specified PCAP capture file instead of the network.
+ .IP \fB-v\fR
+ "Versus" mode. Invert the sense of matching, to select non-matching
+ URLs.
diff --git a/dsniff/patches/patch-bj b/dsniff/patches/patch-bj
new file mode 100644
index 0000000000..5d98d9dcb4
--- /dev/null
+++ b/dsniff/patches/patch-bj
@@ -0,0 +1,57 @@
+$NetBSD: patch-bj,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/urlsnarf.c dsniff-2.3/urlsnarf.c
+--- urlsnarf.c.orig	2000-12-19 02:53:36.000000000 +0000
++++ urlsnarf.c	2009-05-06 23:24:07.000000000 +0100
+@@ -39,7 +39,7 @@
+ usage(void)
+ {
+ 	fprintf(stderr, "Version: " VERSION "\n"
+-		"Usage: urlsnarf [-n] [-i interface] [[-v] pattern [expression]]\n");
++		"Usage: urlsnarf [-n] [-i interface | -p pcapfile] [[-v] pattern [expression]]\n");
+ 	exit(1);
+ }
+ 
+@@ -193,11 +193,14 @@
+ {
+ 	int c;
+ 	
+-	while ((c = getopt(argc, argv, "i:nvh?V")) != -1) {
++	while ((c = getopt(argc, argv, "i:p:nvh?V")) != -1) {
+ 		switch (c) {
+ 		case 'i':
+ 			nids_params.device = optarg;
+ 			break;
++		case 'p':
++			nids_params.filename = optarg;
++			break;
+ 		case 'n':
+ 			Opt_dns = 0;
+ 			break;
+@@ -230,8 +233,24 @@
+ 	
+ 	nids_register_tcp(sniff_http_client);
+ 
+-	warnx("listening on %s [%s]", nids_params.device,
+-	      nids_params.pcap_filter);
++        if (nids_params.pcap_filter != NULL) {
++                if (nids_params.filename == NULL) {
++                        warnx("listening on %s [%s]", nids_params.device,
++                              nids_params.pcap_filter);
++                }
++                else {
++                        warnx("using %s [%s]", nids_params.filename,
++                              nids_params.pcap_filter);
++                }
++        }
++        else {
++                if (nids_params.filename == NULL) {
++                    warnx("listening on %s", nids_params.device);
++                }
++                else {
++                    warnx("using %s", nids_params.filename);
++                }
++        }
+ 
+ 	nids_run();
+ 	
diff --git a/dsniff/patches/patch-bk b/dsniff/patches/patch-bk
new file mode 100644
index 0000000000..973ee4344e
--- /dev/null
+++ b/dsniff/patches/patch-bk
@@ -0,0 +1,23 @@
+$NetBSD: patch-bk,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/webspy.8 dsniff-2.3/webspy.8
+--- webspy.8.orig	2000-11-14 15:51:05.000000000 +0000
++++ webspy.8	2009-05-06 23:24:07.000000000 +0100
+@@ -9,7 +9,7 @@
+ .na
+ .nf
+ .fi
+-\fBwebspy\fR [\fB-i \fIinterface\fR] \fIhost\fR
++\fBwebspy\fR [\fB-i \fIinterface\fR | \fB-p \fIpcapfile\fR] \fIhost\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+@@ -20,6 +20,8 @@
+ .SH OPTIONS
+ .IP "\fB-i \fIinterface\fR"
+ Specify the interface to listen on.
++.IP "\fB-p \fIpcapfile\fR"
++Process packets from the specified PCAP capture file instead of the network.
+ .IP \fIhost\fR
+ Specify the web client to spy on.
+ .SH "SEE ALSO"
diff --git a/dsniff/patches/patch-bl b/dsniff/patches/patch-bl
new file mode 100644
index 0000000000..e35ec17e7c
--- /dev/null
+++ b/dsniff/patches/patch-bl
@@ -0,0 +1,45 @@
+$NetBSD: patch-bl,v 1.1 2009/05/09 16:33:04 adrianp Exp $
+
+diff -ur dsniff-2.3.orig/webspy.c dsniff-2.3/webspy.c
+--- webspy.c.orig	2000-11-14 15:51:04.000000000 +0000
++++ webspy.c	2009-05-06 23:24:07.000000000 +0100
+@@ -40,7 +40,7 @@
+ usage(void)
+ {
+ 	fprintf(stderr, "Version: " VERSION "\n"
+-		"Usage: %s [-i interface] host\n", progname);
++		"Usage: %s [-i interface | -p pcapfile] host\n", progname);
+ 	exit(1);
+ }
+ 
+@@ -180,11 +180,14 @@
+ {
+ 	int c;
+ 	
+-	while ((c = getopt(argc, argv, "i:h?V")) != -1) {
++	while ((c = getopt(argc, argv, "i:p:h?V")) != -1) {
+ 		switch (c) {
+ 		case 'i':
+ 			nids_params.device = optarg;
+ 			break;
++		case 'p':
++			nids_params.filename = optarg;
++			break;
+ 		default:
+ 			usage();
+ 		}
+@@ -212,7 +215,13 @@
+ 	
+ 	nids_register_tcp(sniff_http_client);
+ 
+-	warnx("listening on %s", nids_params.device);
++        if (nids_params.filename == NULL) {
++                warnx("listening on %s", nids_params.device);
++        }
++        else {
++                warnx("using %s", nids_params.filename);
++        }
++
+ 
+ 	nids_run();
+ 	
diff --git a/dsniff/patches/patch-sshmitm.c b/dsniff/patches/patch-sshmitm.c
new file mode 100644
index 0000000000..ad14923af6
--- /dev/null
+++ b/dsniff/patches/patch-sshmitm.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-sshmitm.c,v 1.1 2013/09/29 10:19:01 joerg Exp $
+
+--- sshmitm.c.orig	2013-09-28 13:07:42.000000000 +0000
++++ sshmitm.c
+@@ -41,6 +41,7 @@ int	 mitm_fd;
+ int	 client_fd, server_fd;
+ SSH_CTX	*ssh_client_ctx, *ssh_server_ctx;
+ SSH	*ssh_client, *ssh_server;
++#define csin my_csin
+ struct	 sockaddr_in csin, ssin;
+ int	 sig_pipe[2];
+ 
diff --git a/dsniff/patches/patch-webmitm.c b/dsniff/patches/patch-webmitm.c
new file mode 100644
index 0000000000..51b6b64d7f
--- /dev/null
+++ b/dsniff/patches/patch-webmitm.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-webmitm.c,v 1.1 2013/09/29 10:19:01 joerg Exp $
+
+--- webmitm.c.orig	2013-09-28 13:09:07.000000000 +0000
++++ webmitm.c
+@@ -43,6 +43,7 @@ int	 http_fd, https_fd;
+ int	 client_fd, server_fd;
+ SSL_CTX	*ssl_client_ctx, *ssl_server_ctx;
+ SSL	*ssl_client, *ssl_server;
++#define csin my_csin
+ struct	 sockaddr_in csin, ssin;
+ int	 do_ssl, sig_pipe[2];
+ 


Home | Main Index | Thread Index | Old Index