Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Fedora Release Engineering
52ef0f6e3b dist-git conversion 2010-07-29 05:36:52 +00:00
Bill Nottingham
cbafebe584 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:49:22 +00:00
a3b01bcf48 BZ 434582. 2008-02-22 23:21:23 +00:00
98adfc5d02 Initial import. 2007-12-07 23:19:39 +00:00
146253e801 Initialize branch F-8 for pcapdiff 2007-12-07 17:02:03 +00:00
9 changed files with 113 additions and 21 deletions

View file

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: pcapdiff
# $Id$
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
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)

View file

@ -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

View file

@ -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
#

View file

@ -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

6
pcapdiff.py Normal file
View file

@ -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()

79
pcapdiff.spec Normal file
View file

@ -0,0 +1,79 @@
Name: pcapdiff
Version: 0.1
Release: 3%{?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.py
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
* Fri Feb 22 2008 Jon Ciesla <limb@jcomserv.net> - 0.1-3
- BZ 434582.
* Tue Dec 04 2007 Jon Ciesla <limb@jcomserv.net> - 0.1-2
- Added python-devel BR to fix .pyc/.pyo issue.
* Fri Nov 30 2007 Jon Ciesla <limb@jcomserv.net> - 0.1-1
- create.

6
printpackets Normal file
View file

@ -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()

View file

@ -0,0 +1 @@
2f7f122969c7894a6aff3e72c886f63d pcapdiff-0.1.tar.gz