1 |
commit: ffd19f440039ff1c2b4e4e1234c1f9c89a7ae806 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 7 02:56:16 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 7 06:44:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffd19f44 |
7 |
|
8 |
net-analyzer/dsniff: initial import (revival) |
9 |
|
10 |
Removed in 1aa904188ff115f14f6d5fac4e0483152a08ed37. Now |
11 |
using (substantial) Debian patchset. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/643460 |
14 |
Closes: https://bugs.gentoo.org/674192 |
15 |
Closes: https://bugs.gentoo.org/571446 |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
net-analyzer/dsniff/Manifest | 2 + |
19 |
net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild | 73 ++++++++++++++ |
20 |
.../files/dsniff-2.4_beta1_p30-httppostfix.patch | 21 +++++ |
21 |
.../dsniff-2.4_beta1_p30-libdir-configure.patch | 105 +++++++++++++++++++++ |
22 |
.../files/dsniff-2.4_beta1_p30-respect-AR.patch | 22 +++++ |
23 |
net-analyzer/dsniff/metadata.xml | 17 ++++ |
24 |
6 files changed, 240 insertions(+) |
25 |
|
26 |
diff --git a/net-analyzer/dsniff/Manifest b/net-analyzer/dsniff/Manifest |
27 |
new file mode 100644 |
28 |
index 000000000000..cd9131c35ad9 |
29 |
--- /dev/null |
30 |
+++ b/net-analyzer/dsniff/Manifest |
31 |
@@ -0,0 +1,2 @@ |
32 |
+DIST dsniff_2.4b1+debian-30.debian.tar.xz 30788 BLAKE2B 8605b1dcca36f626f31410d88d25a57e6661b57b941155cdbde951991b09fb2dd7c147b1fdd1a22eded1cf904c890317b1844a7829cd6e43fd2fc5defc79b5f3 SHA512 45ffe34fcd30cd1461a354891b9d5567038cc176dbfa79c67020075cd40ae09b7092954925019e583d0d69cae76a558049b489745454a8034ce3e9e832c58f64 |
33 |
+DIST dsniff_2.4b1+debian.orig.tar.gz 130220 BLAKE2B e6953a5bfc5331b030e1a5335987c51fa4cf2c644fc4e7ac9aefe17f52373a1f66ccef36c5d9136542f68a475350138b1f3e501bc9494a0fd4988c7c5a7b2eef SHA512 09c3a864f112f81b8fdf93436886b14eb8f603ec751b13f18cf027307f24098c018eacf98b3ae353731a0cf6f1c9cacfafbb534a0db8b9f0cc793e7515c41b5a |
34 |
|
35 |
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild |
36 |
new file mode 100644 |
37 |
index 000000000000..adb46e181081 |
38 |
--- /dev/null |
39 |
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1_p30.ebuild |
40 |
@@ -0,0 +1,73 @@ |
41 |
+# Copyright 1999-2021 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=7 |
45 |
+ |
46 |
+inherit autotools toolchain-funcs |
47 |
+ |
48 |
+MY_PV="${PV/_beta/b}" |
49 |
+MY_PV="${MY_PV/_p*/}" |
50 |
+MY_PV="$(ver_rs 1 '.' "${MY_PV}")" |
51 |
+# 2.4_beta1_p30 -> 2.4beta1-30 |
52 |
+MY_DEB_PV="$(ver_cut 1-2)$(ver_cut 3-4)-$(ver_cut 6)" |
53 |
+ |
54 |
+DESCRIPTION="A collection of tools for network auditing and penetration testing" |
55 |
+HOMEPAGE="https://monkey.org/~dugsong/dsniff/" |
56 |
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${MY_PV}+debian.orig.tar.gz |
57 |
+ mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${MY_PV}+debian-${PV/*_p}.debian.tar.xz" |
58 |
+S="${WORKDIR}/${P/_beta1*/}" |
59 |
+ |
60 |
+LICENSE="BSD" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~amd64" |
63 |
+IUSE="X" |
64 |
+ |
65 |
+# There's a berkdb configure option but we get a build failure if |
66 |
+# we try to disable it. Not clear how useful the package is |
67 |
+# without it anyway. |
68 |
+RDEPEND="net-libs/libpcap |
69 |
+ >=net-libs/libnet-1.1.2.1-r1 |
70 |
+ >=net-libs/libnids-1.21 |
71 |
+ net-libs/libnsl:= |
72 |
+ net-libs/libtirpc:= |
73 |
+ dev-libs/openssl:= |
74 |
+ >=sys-libs/db-4:= |
75 |
+ X? ( x11-libs/libXmu )" |
76 |
+DEPEND="${DEPEND} |
77 |
+ net-libs/rpcsvc-proto" |
78 |
+# Calls rpcgen during build |
79 |
+BDEPEND="net-libs/rpcsvc-proto" |
80 |
+ |
81 |
+PATCHES=( |
82 |
+ "${WORKDIR}"/debian/patches/ |
83 |
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-httppostfix.patch |
84 |
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-libdir-configure.patch |
85 |
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-respect-AR.patch |
86 |
+) |
87 |
+ |
88 |
+src_prepare() { |
89 |
+ default |
90 |
+ |
91 |
+ mv configure.{in,ac} || die |
92 |
+ eautoreconf |
93 |
+} |
94 |
+ |
95 |
+src_configure() { |
96 |
+ tc-export AR |
97 |
+ |
98 |
+ econf \ |
99 |
+ $(use_with X x) |
100 |
+} |
101 |
+ |
102 |
+src_compile() { |
103 |
+ emake CC="$(tc-getCC)" |
104 |
+} |
105 |
+ |
106 |
+src_install() { |
107 |
+ emake install install_prefix="${D}" |
108 |
+ |
109 |
+ dodir /etc/dsniff |
110 |
+ cp "${ED}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \ |
111 |
+ "${ED}"/etc/dsniff/ || die |
112 |
+ dodoc CHANGES README TODO |
113 |
+} |
114 |
|
115 |
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 |
116 |
new file mode 100644 |
117 |
index 000000000000..487e45321662 |
118 |
--- /dev/null |
119 |
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-httppostfix.patch |
120 |
@@ -0,0 +1,21 @@ |
121 |
+Allow mixed case in some fields. |
122 |
+--- a/decode_http.c |
123 |
++++ b/decode_http.c |
124 |
+@@ -139,14 +139,14 @@ |
125 |
+ host = p; |
126 |
+ } |
127 |
+ else if (req[0] == 'P') { |
128 |
+- if (strncmp(p, "Content-type: ", 14) == 0) { |
129 |
+- if (strncmp(p + 14, "application/" |
130 |
++ if (strncasecmp(p, "Content-type: ", 14) == 0) { |
131 |
++ if (strncasecmp(p + 14, "application/" |
132 |
+ "x-www-form-urlencoded", |
133 |
+ 33) != 0) { |
134 |
+ query = NULL; |
135 |
+ } |
136 |
+ } |
137 |
+- else if (strncmp(p, "Content-length: ", 16) == 0) { |
138 |
++ else if (strncasecmp(p, "Content-length: ", 16) == 0) { |
139 |
+ p += 16; |
140 |
+ i = atoi(p); |
141 |
+ if ((msg = buf_tok(&inbuf, NULL, i)) == NULL) |
142 |
|
143 |
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 |
144 |
new file mode 100644 |
145 |
index 000000000000..a2309cd836e8 |
146 |
--- /dev/null |
147 |
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-libdir-configure.patch |
148 |
@@ -0,0 +1,105 @@ |
149 |
+Respect libdir rather than always using 'lib'. |
150 |
+--- a/configure.in |
151 |
++++ b/configure.in |
152 |
+@@ -127,13 +127,13 @@ AC_ARG_WITH(db, |
153 |
+ if test -f ${dir}/include/db_185.h; then |
154 |
+ AC_DEFINE(HAVE_DB_185_H) |
155 |
+ DBINC="-I${dir}/include" |
156 |
+- DBLIB="-L${dir}/lib -ldb" |
157 |
++ DBLIB="-L${dir}/${libdir#${prefix}} -ldb" |
158 |
+ have_db=yes |
159 |
+ break |
160 |
+ elif test -f ${dir}/include/db.h; then |
161 |
+ AC_DEFINE(HAVE_DB_H) |
162 |
+ DBINC="-I${dir}/include" |
163 |
+- DBLIB="-L${dir}/lib -ldb" |
164 |
++ DBLIB="-L${dir}/${libdir#${prefix}} -ldb" |
165 |
+ have_db=yes |
166 |
+ break |
167 |
+ fi |
168 |
+@@ -178,11 +178,11 @@ AC_ARG_WITH(libpcap, |
169 |
+ PCAPLIB="-L$withval -lpcap" |
170 |
+ elif test -f $withval/include/pcap.h -a \ |
171 |
+ -f $withval/include/net/bpf.h -a \ |
172 |
+- -f $withval/lib/libpcap.a; then |
173 |
++ -f $withval/${libdir#${prefix}}/libpcap.a; then |
174 |
+ owd=`pwd` |
175 |
+ if cd $withval; then withval=`pwd`; cd $owd; fi |
176 |
+ PCAPINC="-I$withval/include" |
177 |
+- PCAPLIB="-L$withval/lib -lpcap" |
178 |
++ PCAPLIB="-L$withval/${libdir#${prefix}} -lpcap" |
179 |
+ else |
180 |
+ AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval) |
181 |
+ fi |
182 |
+@@ -190,7 +190,7 @@ AC_ARG_WITH(libpcap, |
183 |
+ esac ], |
184 |
+ [ if test -f ${prefix}/include/pcap.h; then |
185 |
+ PCAPINC="-I${prefix}/include" |
186 |
+- PCAPLIB="-L${prefix}/lib -lpcap" |
187 |
++ PCAPLIB="-L${prefix}/${libdir#${prefix}} -lpcap" |
188 |
+ elif test -f /usr/include/pcap/pcap.h; then |
189 |
+ PCAPINC="-I/usr/include/pcap" |
190 |
+ PCAPLIB="-lpcap" |
191 |
+@@ -226,7 +226,7 @@ AC_ARG_WITH(libnet, |
192 |
+ CFLAGS="$CFLAGS `libnet-config --defines`" |
193 |
+ fi |
194 |
+ LNETINC="-I$withval/include" |
195 |
+- LNETLIB="-L$withval/lib -lnet" |
196 |
++ LNETLIB="-L$withval/${libdir#${prefix}} -lnet" |
197 |
+ else |
198 |
+ AC_ERROR(libnet.h or libnet.a not found in $withval) |
199 |
+ fi |
200 |
+@@ -235,7 +235,7 @@ AC_ARG_WITH(libnet, |
201 |
+ [ if test -f ${prefix}/include/libnet.h; then |
202 |
+ CFLAGS="$CFLAGS `${prefix}/bin/libnet-config --defines`" |
203 |
+ LNETINC="-I${prefix}/include" |
204 |
+- LNETLIB="-L${prefix}/lib -lnet" |
205 |
++ LNETLIB="-L${prefix}/${libdir#${prefix}} -lnet" |
206 |
+ elif test -f /usr/include/libnet.h; then |
207 |
+ CFLAGS="$CFLAGS `libnet-config --defines`" |
208 |
+ LNETLIB="-lnet" |
209 |
+@@ -267,7 +267,7 @@ AC_ARG_WITH(libnids, |
210 |
+ owd=`pwd` |
211 |
+ if cd $withval; then withval=`pwd`; cd $owd; fi |
212 |
+ NIDSINC="-I$withval/include" |
213 |
+- NIDSLIB="-L$withval/lib -lnids" |
214 |
++ NIDSLIB="-L$withval/${libdir#${prefix}} -lnids" |
215 |
+ else |
216 |
+ AC_ERROR(nids.h or libnids.a not found in $withval) |
217 |
+ fi |
218 |
+@@ -275,7 +275,7 @@ AC_ARG_WITH(libnids, |
219 |
+ esac ], |
220 |
+ [ if test -f ${prefix}/include/nids.h; then |
221 |
+ NIDSINC="-I${prefix}/include" |
222 |
+- NIDSLIB="-L${prefix}/lib -lnids" |
223 |
++ NIDSLIB="-L${prefix}/${libdir#${prefix}} -lnids" |
224 |
+ elif test -f /usr/include/nids.h; then |
225 |
+ NIDSLIB="-lnids" |
226 |
+ else |
227 |
+@@ -309,11 +309,11 @@ AC_ARG_WITH(openssl, |
228 |
+ SSLINC="-I$withval/include" |
229 |
+ SSLLIB="-L$withval -lssl -lcrypto" |
230 |
+ elif test -f $withval/include/openssl/ssl.h -a \ |
231 |
+- -f $withval/lib/libssl.a; then |
232 |
++ -f $withval/${libdir#${prefix}}/libssl.a; then |
233 |
+ owd=`pwd` |
234 |
+ if cd $withval; then withval=`pwd`; cd $owd; fi |
235 |
+ SSLINC="-I$withval/include" |
236 |
+- SSLLIB="-L$withval/lib -lssl -lcrypto" |
237 |
++ SSLLIB="-L$withval/${libdir#${prefix}} -lssl -lcrypto" |
238 |
+ else |
239 |
+ AC_ERROR(ssl.h or libssl.a not found in $withval) |
240 |
+ fi |
241 |
+@@ -322,10 +322,10 @@ AC_ARG_WITH(openssl, |
242 |
+ esac ], |
243 |
+ [ if test -f ${prefix}/include/openssl/ssl.h; then |
244 |
+ SSLINC="-I${prefix}/include" |
245 |
+- SSLLIB="-L${prefix}/lib -lssl -lcrypto" |
246 |
++ SSLLIB="-L${prefix}/${libdir#${prefix}} -lssl -lcrypto" |
247 |
+ elif test -f ${prefix}/ssl/include/openssl/ssl.h; then |
248 |
+ SSLINC="-I${prefix}/ssl/include" |
249 |
+- SSLLIB="-L${prefix}/ssl/lib -lssl -lcrypto" |
250 |
++ SSLLIB="-L${prefix}/ssl/${libdir#${prefix}} -lssl -lcrypto" |
251 |
+ elif test -f /usr/include/openssl/ssl.h; then |
252 |
+ SSLLIB="-lssl -lcrypto" |
253 |
+ else |
254 |
|
255 |
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 |
256 |
new file mode 100644 |
257 |
index 000000000000..fd2235fada7d |
258 |
--- /dev/null |
259 |
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p30-respect-AR.patch |
260 |
@@ -0,0 +1,22 @@ |
261 |
+Respect the 'AR' environment variable. |
262 |
+--- a/Makefile.in |
263 |
++++ b/Makefile.in |
264 |
+@@ -103,7 +103,7 @@ $(LIBOBJS): |
265 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -c $(srcdir)/missing/$*.c |
266 |
+ |
267 |
+ libmissing.a: $(LIBOBJS) |
268 |
+- ar -cr $@ $(LIBOBJS) |
269 |
++ $(AR) -cr $@ $(LIBOBJS) |
270 |
+ $(RANLIB) $@ |
271 |
+ |
272 |
+ dsniff: $(HDRS) $(SRCS) $(OBJS) libmissing.a |
273 |
+--- a/configure.in |
274 |
++++ b/configure.in |
275 |
+@@ -17,6 +17,7 @@ dnl Checks for programs. |
276 |
+ AC_PROG_CC |
277 |
+ AC_PROG_INSTALL |
278 |
+ AC_PROG_RANLIB |
279 |
++AC_CHECK_PROG(AR,ar,ar) |
280 |
+ |
281 |
+ dnl Checks for header files. |
282 |
+ AC_PATH_XTRA |
283 |
|
284 |
diff --git a/net-analyzer/dsniff/metadata.xml b/net-analyzer/dsniff/metadata.xml |
285 |
new file mode 100644 |
286 |
index 000000000000..32fb662b8379 |
287 |
--- /dev/null |
288 |
+++ b/net-analyzer/dsniff/metadata.xml |
289 |
@@ -0,0 +1,17 @@ |
290 |
+<?xml version="1.0" encoding="UTF-8"?> |
291 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
292 |
+<pkgmetadata> |
293 |
+ <maintainer type="project"> |
294 |
+ <email>netmon@g.o</email> |
295 |
+ <name>Gentoo network monitoring and analysis project</name> |
296 |
+ </maintainer> |
297 |
+ <longdescription> |
298 |
+ dsniff is a collection of tools for network auditing and penetration testing. |
299 |
+ dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a |
300 |
+ network for interesting data (passwords, e-mail, files, etc.). arpspoof, |
301 |
+ dnsspoof, and macof facilitate the interception of network traffic normally |
302 |
+ unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm |
303 |
+ implement active monkey-in-the-middle attacks against redirected SSH and HTTPS |
304 |
+ sessions by exploiting weak bindings in ad-hoc PKI. |
305 |
+ </longdescription> |
306 |
+</pkgmetadata> |