From c8eea69e4c623cf25804afadef8f1596c0674445 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 7 Dec 2007 17:02:31 +0000 Subject: [PATCH 1/5] Initialize branch EL-4 for pcapdiff --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..6ec5cef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-4 From f22adb9a7cc8c400ca49a7aecf0c4cd431bf9ace Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Sat, 15 Dec 2007 17:15:31 +0000 Subject: [PATCH 2/5] Initial import. --- pcapdiff | 6 ++ pcapdiff-pcapdiff-noshebang.patch | 7 +++ pcapdiff-pcapdiff_helper-noshebang.patch | 7 +++ pcapdiff-printpackets-noshebang.patch | 7 +++ pcapdiff.spec | 76 ++++++++++++++++++++++++ printpackets | 6 ++ sources | 1 + 7 files changed, 110 insertions(+) create mode 100644 pcapdiff create mode 100644 pcapdiff-pcapdiff-noshebang.patch create mode 100644 pcapdiff-pcapdiff_helper-noshebang.patch create mode 100644 pcapdiff-printpackets-noshebang.patch create mode 100644 pcapdiff.spec create mode 100644 printpackets diff --git a/pcapdiff b/pcapdiff new file mode 100644 index 0000000..87ad9db --- /dev/null +++ b/pcapdiff @@ -0,0 +1,6 @@ +#!/usr/bin/env python +if __name__ == '__main__': + import sys + sys.path.insert(0, '/usr/share/pcapdiff') + from pcapdiff import main + main() diff --git a/pcapdiff-pcapdiff-noshebang.patch b/pcapdiff-pcapdiff-noshebang.patch new file mode 100644 index 0000000..6c9d63a --- /dev/null +++ b/pcapdiff-pcapdiff-noshebang.patch @@ -0,0 +1,7 @@ +--- pcapdiff.py 2007-11-30 14:17:27.000000000 -0600 ++++ pcapdiff.py 2007-11-30 14:17:27.000000000 -0600 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + # + # pcapdiff: shows you the differences between two pcap dump files + # (such as those produced by tcpdump), with an eye towards counting diff --git a/pcapdiff-pcapdiff_helper-noshebang.patch b/pcapdiff-pcapdiff_helper-noshebang.patch new file mode 100644 index 0000000..4e6049d --- /dev/null +++ b/pcapdiff-pcapdiff_helper-noshebang.patch @@ -0,0 +1,7 @@ +--- pcapdiff_helper.py 2007-11-30 14:22:23.000000000 -0600 ++++ pcapdiff_helper.py 2007-11-30 14:22:23.000000000 -0600 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + # + # pcapdiff_helper: helper functions for pcapdiff.py + # diff --git a/pcapdiff-printpackets-noshebang.patch b/pcapdiff-printpackets-noshebang.patch new file mode 100644 index 0000000..db45e1d --- /dev/null +++ b/pcapdiff-printpackets-noshebang.patch @@ -0,0 +1,7 @@ +--- printpackets.py 2007-11-30 14:17:58.000000000 -0600 ++++ printpackets.py 2007-11-30 14:17:58.000000000 -0600 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + # + # printpackets: + # prints out packets from a pcap dump file with ether and ip header info diff --git a/pcapdiff.spec b/pcapdiff.spec new file mode 100644 index 0000000..5bb56a3 --- /dev/null +++ b/pcapdiff.spec @@ -0,0 +1,76 @@ +Name: pcapdiff +Version: 0.1 +Release: 2%{?dist} +Summary: Compares packet captures, detects forged, dropped or mangled packets + +Group: Development/Languages +License: GPLv2+ and GPLv3+ +URL: http://www.eff.org/testyourisp/pcapdiff/ +Source0: http://www.eff.org/files/pcapdiff-%{version}.tar.gz +Source1: pcapdiff +Source2: printpackets +Patch0: pcapdiff-pcapdiff-noshebang.patch +Patch1: pcapdiff-printpackets-noshebang.patch +Patch2: pcapdiff-pcapdiff_helper-noshebang.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: python-devel +Requires: pcapy + +%description +Pcapdiff is a tool developed by the EFF to compare two packet captures and +identify potentially forged, dropped, or mangled packets. Two technically- +inclined friends can set up packet captures (e.g. tcpdump or Wireshark) on +their own computers and produce network traffic between their two computers +over the Internet. Later, they can run pcapdiff on the two packet capture +files to identify suspicious packets for further investigation. See +Detecting packet injection: a guide to observing packet spoofing by ISPs +and EFF's Test Your ISP Project for more background. + +%prep +%setup -qn pcapdiff + +%patch0 -p0 +%patch1 -p0 +%patch2 -p0 + +%build + + +#fix encodings +#sed -i 's/\r//' LICENSE +#sed -i 's/\r//' README +#sed -i 's/\r//' pcapdiff.html +#iconv -f IBM850 -t UTF8 pcapdiff.html > pcapdiff.html.tmp +#mv pcapdiff.html.tmp pcapdiff.html + + +%install +rm -rf $RPM_BUILD_ROOT +install -D -m 755 -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/pcapdiff +install -D -m 644 -p pcapdiff.py $RPM_BUILD_ROOT%{_datadir}/pcapdiff/pcapdiff.py +install -D -m 755 -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/printpackets +install -D -m 644 -p printpackets.py $RPM_BUILD_ROOT%{_datadir}/pcapdiff/printpackets.py +install -D -m 644 -p pcapdiff_helper.py $RPM_BUILD_ROOT%{_datadir}/pcapdiff/pcapdiff_helper.py + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README COPYING.2 COPYING.3 +%{_bindir}/pcapdiff +%{_bindir}/printpackets +%dir %{_datadir}/pcapdiff/ +%{_datadir}/pcapdiff/*.py +%{_datadir}/pcapdiff/*.pyc +%{_datadir}/pcapdiff/*.pyo + +%changelog +* Tue Dec 04 2007 Jon Ciesla - 0.1-2 +- Added python-devel BR to fix .pyc/.pyo issue. + +* Fri Nov 30 2007 Jon Ciesla - 0.1-1 +- create. diff --git a/printpackets b/printpackets new file mode 100644 index 0000000..ed87944 --- /dev/null +++ b/printpackets @@ -0,0 +1,6 @@ +#!/usr/bin/env python +if __name__ == '__main__': + import sys + sys.path.insert(0, '/usr/share/pcapdiff') + from printpackets import main + main() diff --git a/sources b/sources index e69de29..dc80159 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +2f7f122969c7894a6aff3e72c886f63d pcapdiff-0.1.tar.gz From 4fb5d2dd7a0e40768273fed3113bca4c03ae0ae3 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Tue, 18 Dec 2007 12:45:37 +0000 Subject: [PATCH 3/5] Removing bytecde, possible build fix. --- pcapdiff.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/pcapdiff.spec b/pcapdiff.spec index 5bb56a3..64c29a5 100644 --- a/pcapdiff.spec +++ b/pcapdiff.spec @@ -65,8 +65,6 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/printpackets %dir %{_datadir}/pcapdiff/ %{_datadir}/pcapdiff/*.py -%{_datadir}/pcapdiff/*.pyc -%{_datadir}/pcapdiff/*.pyo %changelog * Tue Dec 04 2007 Jon Ciesla - 0.1-2 From 4c17d97f35ee837c3ad1a7b9a61a45c9d428ea09 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:49:22 +0000 Subject: [PATCH 4/5] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5feaa8a..bd4e836 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: pcapdiff -# $Id$ +# $Id: Makefile,v 1.1 2007/12/07 17:01:56 kevin Exp $ NAME := pcapdiff SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 35f2028ad6e4acb5d0dd38e086800bec07ca73eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 05:36:53 +0000 Subject: [PATCH 5/5] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index bd4e836..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: pcapdiff -# $Id: Makefile,v 1.1 2007/12/07 17:01:56 kevin Exp $ -NAME := pcapdiff -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 6ec5cef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-4