[captcp] Initial import (#1025977)

Michele Baldessari mbaldessari at fedoraproject.org
Tue May 6 20:19:24 UTC 2014


commit 808c54db5dc3679d0e0494dce4e6fc2f5a0d11ab
Author: Michele Baldessari <michele at acksyn.org>
Date:   Tue May 6 21:19:42 2014 +0100

    Initial import (#1025977)

 .gitignore                       |    1 +
 add-mit-license-raphael-js.patch |   25 ++++++++++++
 captcp.8                         |   72 +++++++++++++++++++++++++++++++++++
 captcp.spec                      |   78 ++++++++++++++++++++++++++++++++++++++
 correct-python-path.patch        |    9 ++++
 fix-install.patch                |   23 +++++++++++
 sources                          |    1 +
 7 files changed, 209 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ecf8013 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/captcp-1.7-e730240.tar.gz
diff --git a/add-mit-license-raphael-js.patch b/add-mit-license-raphael-js.patch
new file mode 100644
index 0000000..1fbce98
--- /dev/null
+++ b/add-mit-license-raphael-js.patch
@@ -0,0 +1,25 @@
+diff -up captcp-1.7/MIT-LICENSE.michele captcp-1.7/MIT-LICENSE
+--- captcp-1.7/MIT-LICENSE.michele	2013-11-16 11:24:47.356736780 +0000
++++ captcp-1.7/MIT-LICENSE	2013-11-16 11:23:49.627344623 +0000
+@@ -0,0 +1,21 @@
++The MIT License (MIT)
++
++Copyright (c) 2008 Dmitry Baranovskiy
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
diff --git a/captcp.8 b/captcp.8
new file mode 100644
index 0000000..dac1a1a
--- /dev/null
+++ b/captcp.8
@@ -0,0 +1,72 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "CAPTCP" "" "November 2013" "" "captcp"
+.
+.SH "About"
+Since several years I used to use a own repository of scripts to analyze network traffic\. First I started with plain tcpdump, tcptrace, tcpslice, tcpstat and the other tools\. After some years I started to wrote an own set of scripts, starting with Perl and later also some Ruby scripts\. Before I forget, of course, a few C programs are also in the collection\. Captcp is the attempt to rewrite the scripts in Python\.
+.
+.P
+This documentation is also avaiable in PDF form: link:captcp\.pdf[PDF file]
+.
+.SH "Some Words About Packet Analysis"
+During the years some wisdoms are here collected\. You can ignore them, sure, but eventually there are some tricks for you\.
+.
+.IP "\(bu" 4
+Don\'t capture data life \- capture the data via tcpdump and analyze the data off\-line
+.
+.IP "\(bu" 4
+If you know what you want to analyze you can adjust tcpdump to capture the required data
+.
+.IP "\(bu" 4
+Make backups of your traces
+.
+.IP "\(bu" 4
+Don\'t use one tool, find the most useful tool for your requirements
+.
+.IP "\(bu" 4
+Last but not least: question the results!
+.
+.IP "" 0
+.
+.
+.SH "Modulse Overview"
+The script functionality is splitted into submodules\. Similar to git, perf and kvm\-tool\. The following list provides an overview over the currently supported list\. If in doubt you can call captcp without any argument to get the full list\.
+.
+.IP "\(bu" 4
+Stacktrace
+.
+.IP "\(bu" 4
+Show
+.
+.IP "\(bu" 4
+Statistic
+.
+.IP "\(bu" 4
+Payloadtimeport
+.
+.IP "\(bu" 4
+Timesequence
+.
+.IP "\(bu" 4
+Geoip
+.
+.IP "\(bu" 4
+Throughtput
+.
+.IP "\(bu" 4
+Connection
+.
+.IP "\(bu" 4
+Template
+.
+.IP "\(bu" 4
+Sequencegraph
+.
+.IP "" 0
+.
+.SH "General Synopsis"
+[verse] \'captcp\' [\-\-help] MODULENAME [ARGS]
+.
+.SH "See also"
+/usr/share/doc/captcp/
diff --git a/captcp.spec b/captcp.spec
new file mode 100644
index 0000000..88db658
--- /dev/null
+++ b/captcp.spec
@@ -0,0 +1,78 @@
+%global commit e73024063fd6c9cb73a325b92f316ee6fbfd0e56
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name:		captcp
+Version:	1.7
+Release:	2%{?dist}
+Summary:	TCP Analyzer for PCAP Files
+License:	GPLv3 and MIT
+URL:		http://research.protocollabs.com/captcp/
+Source0:	https://github.com/hgn/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+Source1:	captcp.8
+Patch0:		add-mit-license-raphael-js.patch
+Patch1:		fix-install.patch
+Patch2:		correct-python-path.patch
+
+BuildArch:	noarch
+BuildRequires:	python2-devel
+Requires:	gnuplot
+Requires:	numpy
+Requires:	python-dpkt
+Requires:	systemtap
+
+%description
+Captcp is a free and open source program for TCP analysis of PCAP files. 
+Normally recorded via Tcpdump or Wireshark. Captcp is an attempt to rewrite 
+and bundle all common TCP analysis tools in one easy to use program:
+providing a clean and consistent command line syntax. 
+Captcp is written in Python and easy extendable. Captcp is not a substitute 
+for Tcpdump or Wireshark - it complements these tools instead.
+
+%prep
+%setup -qn %{name}-%{commit}
+%patch0 -p1
+%patch1 -p1 -b .make
+%patch2 -p1 -b .python
+
+%build
+
+%install
+%make_install
+install -m 644 -D %{SOURCE1} %{buildroot}%{_mandir}/man8/captcp.8
+
+%files
+%doc Documentation/* LICENSE CREDITS TODO MIT-LICENSE
+%{_datadir}/captcp/
+%{_mandir}/man8/captcp.8*
+%{_bindir}/captcp
+
+%changelog
+* Mon Dec 09 2013 Michele Baldessari <michele at acksyn.org> - 1.7-2
+- Make GPLv3 explicit in the License tag and remove GPLv2+ as
+  upstream chose GPLv3 for the .stp file
+- Remove bash script and install captcp directly in /usr/bin
+- Set the python interpreter to /usr/bin/python
+
+* Sat Nov 16 2013 Michele Baldessari <michele at acksyn.org> - 1.7-1
+- New upstream (1.7+commits to e73024063f to have properly licenses images)
+- Add MIT License for raphael-js as found on http://raphaeljs.com/license.html
+
+* Sun Nov 10 2013 Michele Baldessari <michele at acksyn.org> - 1.6-5
+- Various code fixes and cleanups
+- Simplify files section with a Makefile patch
+
+* Fri Nov 08 2013 Michele Baldessari <michele at acksyn.org> - 1.6-4
+- Removed git-core to keep things simple
+- Fixed sockstatistic when used with later versions of ss (as in F20)
+- Added more exact output for sockstatistic
+
+* Sun Nov 03 2013 Michele Baldessari <michele at acksyn.org> - 1.6-3
+- Added git-core as BR
+
+* Sat Nov 02 2013 Michele Baldessari <michele at acksyn.org> - 1.6-2
+- Fixed hardcoded dirs and use macros instead
+- Added texlive-epstopdf-bin in Requires as socketstatistic requires it
+- Added a patch to correct some help messages
+
+* Fri Nov  1 2013 Michele Baldessari <michele at acksyn.org> - 1.6-1
+- Initial package
diff --git a/correct-python-path.patch b/correct-python-path.patch
new file mode 100644
index 0000000..422adb0
--- /dev/null
+++ b/correct-python-path.patch
@@ -0,0 +1,9 @@
+diff -up captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/captcp.py.orig2 captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/captcp.py
+--- captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/captcp.py.orig2	2013-12-09 21:56:21.499866289 +0000
++++ captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/captcp.py	2013-12-09 21:56:28.834895134 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ #
+ # Email: Hagen Paul Pfeifer <hagen at jauu.net>
+ # URL: http://research.protocollabs.com/captcp/
diff --git a/fix-install.patch b/fix-install.patch
new file mode 100644
index 0000000..55f0394
--- /dev/null
+++ b/fix-install.patch
@@ -0,0 +1,23 @@
+diff -up captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/Makefile.make captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/Makefile
+--- captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/Makefile.make	2013-11-16 18:55:39.000000000 +0000
++++ captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/Makefile	2013-12-09 22:00:55.874949836 +0000
+@@ -20,7 +20,7 @@ install: captcp.py
+ 	test -d $(DESTDIR)$(PREFIX)/share/captcp/data/connection-animation-data/images || \
+ 					mkdir -p $(DESTDIR)$(PREFIX)/share/captcp/data/connection-animation-data/images
+ 
+-	$(INSTALL) -m 0755 captcp.py $(DESTDIR)$(PREFIX)/share/captcp
++	$(INSTALL) -m 0755 captcp.py $(DESTDIR)$(PREFIX)/bin/captcp
+ 	$(INSTALL) data/stap-scripts/* $(DESTDIR)$(PREFIX)/share/captcp/data/stap-scripts
+ 	$(INSTALLDATA) data/templates/* $(DESTDIR)$(PREFIX)/share/captcp/data/templates
+ 	$(INSTALLDATA) data/connection-animation-data/captcp-anim.js \
+@@ -36,9 +36,6 @@ install: captcp.py
+ 	$(INSTALLDATA) data/connection-animation-data/images/* \
+ 					$(DESTDIR)$(PREFIX)/share/captcp/data/connection-animation-data/images/
+ 
+-	rm -f $(DESTDIR)$(PREFIX)/bin/captcp
+-	ln -s $(DESTDIR)$(PREFIX)/share/captcp/captcp.py $(DESTDIR)$(PREFIX)/bin/captcp
+-
+ uninstall:
+ 	rm -rf $(DESTDIR)$(PREFIX)/share/captcp
+ 	rm -rf $(DESTDIR)$(PREFIX)/bin/captcp
+diff -up captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/data/templates/gnuplot.make captcp-e73024063fd6c9cb73a325b92f316ee6fbfd0e56/data/templates/gnuplot
diff --git a/sources b/sources
index e69de29..4f24c8e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5377d1bc85f052a64c166f846f9845c4  captcp-1.7-e730240.tar.gz


More information about the scm-commits mailing list