Initial import.

This commit is contained in:
Gwyn Ciesla 2007-12-15 17:14:29 +00:00
commit 2a0bb736b2
7 changed files with 110 additions and 0 deletions

6
pcapdiff 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()

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

76
pcapdiff.spec Normal file
View file

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