From 8e874af0b8f127b98b4b76bf185710d6dcfa4f18 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Fri, 7 Aug 2020 00:53:06 +0200 Subject: [PATCH] Ensure that libmissing.a is built when its being used for linking --- dsniff-2.4-libtirpc.patch | 14 ++++----- dsniff-2.4-smp_mflags.patch | 59 +++++++++++++++++++++++++++++++++++-- dsniff.spec | 4 +-- 3 files changed, 66 insertions(+), 11 deletions(-) diff --git a/dsniff-2.4-libtirpc.patch b/dsniff-2.4-libtirpc.patch index 738aa3a..7835a6f 100644 --- a/dsniff-2.4-libtirpc.patch +++ b/dsniff-2.4-libtirpc.patch @@ -20,32 +20,32 @@ support in glibc has been deprecated for a long time. - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB) -ltirpc - arpspoof: arpspoof.o arp.o + arpspoof: arpspoof.o arp.o libmissing.a $(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB) @@ -102,7 +102,7 @@ $(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB) - filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o + filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o libmissing.a - $(CC) $(LDFLAGS) -o $@ filesnarf.o nfs_prot.o pcaputil.o rpc.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) + $(CC) $(LDFLAGS) -o $@ filesnarf.o nfs_prot.o pcaputil.o rpc.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) -ltirpc - macof: macof.o + macof: macof.o libmissing.a $(CC) $(LDFLAGS) -o $@ macof.o $(LIBS) $(PCAPLIB) $(LNETLIB) @@ -114,7 +114,7 @@ $(CC) $(LDFLAGS) -o $@ msgsnarf.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) - sshmitm: sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o + sshmitm: sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o libmissing.a - $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB) + $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB) -ltirpc - sshow: sshow.o pcaputil.o + sshow: sshow.o pcaputil.o libmissing.a $(CC) $(LDFLAGS) -o $@ sshow.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) @@ -132,7 +132,7 @@ $(CC) $(LDFLAGS) -o $@ urlsnarf.o base64.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) - webmitm: webmitm.o base64.o buf.o decode_http.o record.o + webmitm: webmitm.o base64.o buf.o decode_http.o record.o libmissing.a - $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB) + $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB) -ltirpc - webspy: webspy.o base64.o buf.o remote.o + webspy: webspy.o base64.o buf.o remote.o libmissing.a $(CC) $(LDFLAGS) -o $@ webspy.o base64.o buf.o remote.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(X11LIB) diff --git a/dsniff-2.4-smp_mflags.patch b/dsniff-2.4-smp_mflags.patch index 791faa9..4138717 100644 --- a/dsniff-2.4-smp_mflags.patch +++ b/dsniff-2.4-smp_mflags.patch @@ -4,7 +4,7 @@ its being used for linking. --- dsniff-2.4/Makefile.in 2018-07-14 02:54:20.405095355 +0200 +++ dsniff-2.4/Makefile.in.smp_mflags 2018-07-14 02:54:44.973245128 +0200 -@@ -92,7 +92,7 @@ +@@ -92,49 +92,49 @@ ar -cr $@ $(LIBOBJS) $(RANLIB) $@ @@ -12,4 +12,59 @@ its being used for linking. +dsniff: $(HDRS) $(SRCS) $(OBJS) libmissing.a $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB) - arpspoof: arpspoof.o arp.o +-arpspoof: arpspoof.o arp.o ++arpspoof: arpspoof.o arp.o libmissing.a + $(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB) + +-dnsspoof: dnsspoof.o pcaputil.o ++dnsspoof: dnsspoof.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB) + +-filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o ++filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o libmissing.a + $(CC) $(LDFLAGS) -o $@ filesnarf.o nfs_prot.o pcaputil.o rpc.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) + +-macof: macof.o ++macof: macof.o libmissing.a + $(CC) $(LDFLAGS) -o $@ macof.o $(LIBS) $(PCAPLIB) $(LNETLIB) + +-mailsnarf: mailsnarf.o buf.o pcaputil.o ++mailsnarf: mailsnarf.o buf.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ mailsnarf.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) + +-msgsnarf: msgsnarf.o buf.o pcaputil.o ++msgsnarf: msgsnarf.o buf.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ msgsnarf.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) + +-sshmitm: sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o ++sshmitm: sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o libmissing.a + $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB) + +-sshow: sshow.o pcaputil.o ++sshow: sshow.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ sshow.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) + +-tcpkill: tcpkill.o pcaputil.o ++tcpkill: tcpkill.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ tcpkill.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB) + +-tcpnice: tcpnice.o pcaputil.o ++tcpnice: tcpnice.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ tcpnice.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB) + + tcphijack: tcphijack.o pcaputil.o + $(CC) $(LDFLAGS) -o $@ tcphijack.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB) + +-urlsnarf: urlsnarf.o base64.o buf.o pcaputil.o ++urlsnarf: urlsnarf.o base64.o buf.o pcaputil.o libmissing.a + $(CC) $(LDFLAGS) -o $@ urlsnarf.o base64.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) + +-webmitm: webmitm.o base64.o buf.o decode_http.o record.o ++webmitm: webmitm.o base64.o buf.o decode_http.o record.o libmissing.a + $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB) + +-webspy: webspy.o base64.o buf.o remote.o ++webspy: webspy.o base64.o buf.o remote.o libmissing.a + $(CC) $(LDFLAGS) -o $@ webspy.o base64.o buf.o remote.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(X11LIB) + + install: diff --git a/dsniff.spec b/dsniff.spec index 18559e4..ea5d043 100644 --- a/dsniff.spec +++ b/dsniff.spec @@ -107,10 +107,10 @@ by exploiting weak bindings in ad-hoc PKI. %build %configure -make %{?_smp_mflags} +%make_build %install -make install_prefix=$RPM_BUILD_ROOT INSTALL='install -p' install +%make_install install_prefix=$RPM_BUILD_ROOT %files %license LICENSE