summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-07 02:56:16 +0000
committerSam James <sam@gentoo.org>2021-12-07 06:44:25 +0000
commitffd19f440039ff1c2b4e4e1234c1f9c89a7ae806 (patch)
tree8f03494976a2182daf664acd8fc677c641dec582 /net-analyzer
parentdev-ruby/rr: add 3.0.9 (diff)
downloadgentoo-ffd19f440039ff1c2b4e4e1234c1f9c89a7ae806.tar.gz
gentoo-ffd19f440039ff1c2b4e4e1234c1f9c89a7ae806.tar.bz2
gentoo-ffd19f440039ff1c2b4e4e1234c1f9c89a7ae806.zip
net-analyzer/dsniff: initial import (revival)
Removed in 1aa904188ff115f14f6d5fac4e0483152a08ed37. Now using (substantial) Debian patchset. Closes: https://bugs.gentoo.org/643460 Closes: https://bugs.gentoo.org/674192 Closes: https://bugs.gentoo.org/571446 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/dsniff/Manifest2
-rw-r--r--net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild73
-rw-r--r--net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-httppostfix.patch21
-rw-r--r--net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-libdir-configure.patch105
-rw-r--r--net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-respect-AR.patch22
-rw-r--r--net-analyzer/dsniff/metadata.xml17
6 files changed, 240 insertions, 0 deletions
diff --git a/net-analyzer/dsniff/Manifest b/net-analyzer/dsniff/Manifest
new file mode 100644
index 000000000000..cd9131c35ad9
--- /dev/null
+++ b/net-analyzer/dsniff/Manifest
@@ -0,0 +1,2 @@
+DIST dsniff_2.4b1+debian-30.debian.tar.xz 30788 BLAKE2B 8605b1dcca36f626f31410d88d25a57e6661b57b941155cdbde951991b09fb2dd7c147b1fdd1a22eded1cf904c890317b1844a7829cd6e43fd2fc5defc79b5f3 SHA512 45ffe34fcd30cd1461a354891b9d5567038cc176dbfa79c67020075cd40ae09b7092954925019e583d0d69cae76a558049b489745454a8034ce3e9e832c58f64
+DIST dsniff_2.4b1+debian.orig.tar.gz 130220 BLAKE2B e6953a5bfc5331b030e1a5335987c51fa4cf2c644fc4e7ac9aefe17f52373a1f66ccef36c5d9136542f68a475350138b1f3e501bc9494a0fd4988c7c5a7b2eef SHA512 09c3a864f112f81b8fdf93436886b14eb8f603ec751b13f18cf027307f24098c018eacf98b3ae353731a0cf6f1c9cacfafbb534a0db8b9f0cc793e7515c41b5a
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild
new file mode 100644
index 000000000000..adb46e181081
--- /dev/null
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_PV="${MY_PV/_p*/}"
+MY_PV="$(ver_rs 1 '.' "${MY_PV}")"
+# 2.4_beta1_p30 -> 2.4beta1-30
+MY_DEB_PV="$(ver_cut 1-2)$(ver_cut 3-4)-$(ver_cut 6)"
+
+DESCRIPTION="A collection of tools for network auditing and penetration testing"
+HOMEPAGE="https://monkey.org/~dugsong/dsniff/"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${MY_PV}+debian.orig.tar.gz
+ mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${MY_PV}+debian-${PV/*_p}.debian.tar.xz"
+S="${WORKDIR}/${P/_beta1*/}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="X"
+
+# There's a berkdb configure option but we get a build failure if
+# we try to disable it. Not clear how useful the package is
+# without it anyway.
+RDEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.1.2.1-r1
+ >=net-libs/libnids-1.21
+ net-libs/libnsl:=
+ net-libs/libtirpc:=
+ dev-libs/openssl:=
+ >=sys-libs/db-4:=
+ X? ( x11-libs/libXmu )"
+DEPEND="${DEPEND}
+ net-libs/rpcsvc-proto"
+# Calls rpcgen during build
+BDEPEND="net-libs/rpcsvc-proto"
+
+PATCHES=(
+ "${WORKDIR}"/debian/patches/
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-httppostfix.patch
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-libdir-configure.patch
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-respect-AR.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ tc-export AR
+
+ econf \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake install install_prefix="${D}"
+
+ dodir /etc/dsniff
+ cp "${ED}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \
+ "${ED}"/etc/dsniff/ || die
+ dodoc CHANGES README TODO
+}
diff --git a/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-httppostfix.patch b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-httppostfix.patch
new file mode 100644
index 000000000000..487e45321662
--- /dev/null
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-httppostfix.patch
@@ -0,0 +1,21 @@
+Allow mixed case in some fields.
+--- a/decode_http.c
++++ b/decode_http.c
+@@ -139,14 +139,14 @@
+ host = p;
+ }
+ else if (req[0] == 'P') {
+- if (strncmp(p, "Content-type: ", 14) == 0) {
+- if (strncmp(p + 14, "application/"
++ if (strncasecmp(p, "Content-type: ", 14) == 0) {
++ if (strncasecmp(p + 14, "application/"
+ "x-www-form-urlencoded",
+ 33) != 0) {
+ query = NULL;
+ }
+ }
+- else if (strncmp(p, "Content-length: ", 16) == 0) {
++ else if (strncasecmp(p, "Content-length: ", 16) == 0) {
+ p += 16;
+ i = atoi(p);
+ if ((msg = buf_tok(&inbuf, NULL, i)) == NULL)
diff --git a/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-libdir-configure.patch b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-libdir-configure.patch
new file mode 100644
index 000000000000..a2309cd836e8
--- /dev/null
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-libdir-configure.patch
@@ -0,0 +1,105 @@
+Respect libdir rather than always using 'lib'.
+--- a/configure.in
++++ b/configure.in
+@@ -127,13 +127,13 @@ AC_ARG_WITH(db,
+ if test -f ${dir}/include/db_185.h; then
+ AC_DEFINE(HAVE_DB_185_H)
+ DBINC="-I${dir}/include"
+- DBLIB="-L${dir}/lib -ldb"
++ DBLIB="-L${dir}/${libdir#${prefix}} -ldb"
+ have_db=yes
+ break
+ elif test -f ${dir}/include/db.h; then
+ AC_DEFINE(HAVE_DB_H)
+ DBINC="-I${dir}/include"
+- DBLIB="-L${dir}/lib -ldb"
++ DBLIB="-L${dir}/${libdir#${prefix}} -ldb"
+ have_db=yes
+ break
+ fi
+@@ -178,11 +178,11 @@ AC_ARG_WITH(libpcap,
+ PCAPLIB="-L$withval -lpcap"
+ elif test -f $withval/include/pcap.h -a \
+ -f $withval/include/net/bpf.h -a \
+- -f $withval/lib/libpcap.a; then
++ -f $withval/${libdir#${prefix}}/libpcap.a; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ PCAPINC="-I$withval/include"
+- PCAPLIB="-L$withval/lib -lpcap"
++ PCAPLIB="-L$withval/${libdir#${prefix}} -lpcap"
+ else
+ AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval)
+ fi
+@@ -190,7 +190,7 @@ AC_ARG_WITH(libpcap,
+ esac ],
+ [ if test -f ${prefix}/include/pcap.h; then
+ PCAPINC="-I${prefix}/include"
+- PCAPLIB="-L${prefix}/lib -lpcap"
++ PCAPLIB="-L${prefix}/${libdir#${prefix}} -lpcap"
+ elif test -f /usr/include/pcap/pcap.h; then
+ PCAPINC="-I/usr/include/pcap"
+ PCAPLIB="-lpcap"
+@@ -226,7 +226,7 @@ AC_ARG_WITH(libnet,
+ CFLAGS="$CFLAGS `libnet-config --defines`"
+ fi
+ LNETINC="-I$withval/include"
+- LNETLIB="-L$withval/lib -lnet"
++ LNETLIB="-L$withval/${libdir#${prefix}} -lnet"
+ else
+ AC_ERROR(libnet.h or libnet.a not found in $withval)
+ fi
+@@ -235,7 +235,7 @@ AC_ARG_WITH(libnet,
+ [ if test -f ${prefix}/include/libnet.h; then
+ CFLAGS="$CFLAGS `${prefix}/bin/libnet-config --defines`"
+ LNETINC="-I${prefix}/include"
+- LNETLIB="-L${prefix}/lib -lnet"
++ LNETLIB="-L${prefix}/${libdir#${prefix}} -lnet"
+ elif test -f /usr/include/libnet.h; then
+ CFLAGS="$CFLAGS `libnet-config --defines`"
+ LNETLIB="-lnet"
+@@ -267,7 +267,7 @@ AC_ARG_WITH(libnids,
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ NIDSINC="-I$withval/include"
+- NIDSLIB="-L$withval/lib -lnids"
++ NIDSLIB="-L$withval/${libdir#${prefix}} -lnids"
+ else
+ AC_ERROR(nids.h or libnids.a not found in $withval)
+ fi
+@@ -275,7 +275,7 @@ AC_ARG_WITH(libnids,
+ esac ],
+ [ if test -f ${prefix}/include/nids.h; then
+ NIDSINC="-I${prefix}/include"
+- NIDSLIB="-L${prefix}/lib -lnids"
++ NIDSLIB="-L${prefix}/${libdir#${prefix}} -lnids"
+ elif test -f /usr/include/nids.h; then
+ NIDSLIB="-lnids"
+ else
+@@ -309,11 +309,11 @@ AC_ARG_WITH(openssl,
+ SSLINC="-I$withval/include"
+ SSLLIB="-L$withval -lssl -lcrypto"
+ elif test -f $withval/include/openssl/ssl.h -a \
+- -f $withval/lib/libssl.a; then
++ -f $withval/${libdir#${prefix}}/libssl.a; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ SSLINC="-I$withval/include"
+- SSLLIB="-L$withval/lib -lssl -lcrypto"
++ SSLLIB="-L$withval/${libdir#${prefix}} -lssl -lcrypto"
+ else
+ AC_ERROR(ssl.h or libssl.a not found in $withval)
+ fi
+@@ -322,10 +322,10 @@ AC_ARG_WITH(openssl,
+ esac ],
+ [ if test -f ${prefix}/include/openssl/ssl.h; then
+ SSLINC="-I${prefix}/include"
+- SSLLIB="-L${prefix}/lib -lssl -lcrypto"
++ SSLLIB="-L${prefix}/${libdir#${prefix}} -lssl -lcrypto"
+ elif test -f ${prefix}/ssl/include/openssl/ssl.h; then
+ SSLINC="-I${prefix}/ssl/include"
+- SSLLIB="-L${prefix}/ssl/lib -lssl -lcrypto"
++ SSLLIB="-L${prefix}/ssl/${libdir#${prefix}} -lssl -lcrypto"
+ elif test -f /usr/include/openssl/ssl.h; then
+ SSLLIB="-lssl -lcrypto"
+ else
diff --git a/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-respect-AR.patch b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-respect-AR.patch
new file mode 100644
index 000000000000..fd2235fada7d
--- /dev/null
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-respect-AR.patch
@@ -0,0 +1,22 @@
+Respect the 'AR' environment variable.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -103,7 +103,7 @@ $(LIBOBJS):
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -c $(srcdir)/missing/$*.c
+
+ libmissing.a: $(LIBOBJS)
+- ar -cr $@ $(LIBOBJS)
++ $(AR) -cr $@ $(LIBOBJS)
+ $(RANLIB) $@
+
+ dsniff: $(HDRS) $(SRCS) $(OBJS) libmissing.a
+--- a/configure.in
++++ b/configure.in
+@@ -17,6 +17,7 @@ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AC_CHECK_PROG(AR,ar,ar)
+
+ dnl Checks for header files.
+ AC_PATH_XTRA
diff --git a/net-analyzer/dsniff/metadata.xml b/net-analyzer/dsniff/metadata.xml
new file mode 100644
index 000000000000..32fb662b8379
--- /dev/null
+++ b/net-analyzer/dsniff/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <longdescription>
+ dsniff is a collection of tools for network auditing and penetration testing.
+ dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a
+ network for interesting data (passwords, e-mail, files, etc.). arpspoof,
+ dnsspoof, and macof facilitate the interception of network traffic normally
+ unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm
+ implement active monkey-in-the-middle attacks against redirected SSH and HTTPS
+ sessions by exploiting weak bindings in ad-hoc PKI.
+ </longdescription>
+</pkgmetadata>