summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO26
-rw-r--r--01_fixmanpage.patch30
-rw-r--r--02-fix_png_header_bytes.patch15
-rw-r--r--Changelog10
-rw-r--r--PKGBUILD48
-rw-r--r--conf_default_path.patch12
-rw-r--r--fix-excessive-sync.patch25
-rw-r--r--tcpxtract-fix-segfault.patch37
8 files changed, 203 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4028d948e5d7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = tcpxtract
+ pkgdesc = A tool for extracting files from network traffic
+ pkgver = 1.0.1
+ pkgrel = 5
+ url = http://tcpxtract.sourceforge.net
+ changelog = Changelog
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = libpcap
+ options = !emptydirs
+ source = http://sourceforge.net/projects/tcpxtract/files/tcpxtract/1.0.1/tcpxtract-1.0.1.tar.gz/download
+ source = 01_fixmanpage.patch
+ source = 02-fix_png_header_bytes.patch
+ source = conf_default_path.patch
+ source = fix-excessive-sync.patch
+ source = tcpxtract-fix-segfault.patch
+ sha256sums = 613aa6be39772b236d89c5ef377c27b10ac44d1c34731105599283862dfc05be
+ sha256sums = efaba466fb36eef76e1c5071a83b82056d1604322a5a1edbe0824828ea0298e2
+ sha256sums = dd36070732e433665543ef86a13e68823d3c661d3eea7db0785fcab055295944
+ sha256sums = 3591411f1fba7caeb16f05f3e67fc716e1e8b525b118680ab103b1722cea50cf
+ sha256sums = a50480e35d3fa9daffecd3681d161822c7926b652ed09fd7a62d7b909fffced7
+ sha256sums = 8f5627378a29f5a111227a39ad5001a81195b11e74ec375924ce6c7ab96e1819
+
+pkgname = tcpxtract
+
diff --git a/01_fixmanpage.patch b/01_fixmanpage.patch
new file mode 100644
index 000000000000..edea75c51eab
--- /dev/null
+++ b/01_fixmanpage.patch
@@ -0,0 +1,30 @@
+From: Nico Golde <nion@debian.org>
+Description: Remove version and upstream specific notes from manual page
+diff -urNad tcpxtract-1.0.1~/tcpxtract.1 tcpxtract-1.0.1/tcpxtract.1
+--- tcpxtract-1.0.1~/tcpxtract.1 2005-10-06 03:53:57.000000000 +0200
++++ tcpxtract-1.0.1/tcpxtract.1 2009-10-01 19:04:07.000000000 +0200
+@@ -1,7 +1,7 @@
+ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
+ .TH TCPXTRACT "1" "October 2005" "tcpxtract v1.0.1" "User Commands"
+ .SH NAME
+-tcpxtract \- manual page for tcpxtract v1.0.1
++tcpxtract \- extract files from captured network packets
+ .SH SYNOPSIS
+ .B tcpxtract
+ [\fIOPTIONS\fR] [[\fI-d <DEVICE>\fR] [\fI-f <FILE>\fR]]
+@@ -25,15 +25,3 @@
+ .TP
+ \fB\-\-help\fR, \fB\-h\fR
+ display this lovely screen
+-.SH "SEE ALSO"
+-The full documentation for
+-.B tcpxtract
+-is maintained as a Texinfo manual. If the
+-.B info
+-and
+-.B tcpxtract
+-programs are properly installed at your site, the command
+-.IP
+-.B info tcpxtract
+-.PP
+-should give you access to the complete manual.
diff --git a/02-fix_png_header_bytes.patch b/02-fix_png_header_bytes.patch
new file mode 100644
index 000000000000..028ebeb83cd9
--- /dev/null
+++ b/02-fix_png_header_bytes.patch
@@ -0,0 +1,15 @@
+Fix incorrect magic byte values for png headers
+Bug: #649249
+Index: tcpxtract-1.0.1/tcpxtract.conf
+===================================================================
+--- tcpxtract-1.0.1.orig/tcpxtract.conf 2011-11-19 12:50:13.000000000 +0100
++++ tcpxtract-1.0.1/tcpxtract.conf 2011-11-19 12:50:35.000000000 +0100
+@@ -30,7 +30,7 @@
+ jpg(1000000, \xff\xd8\xff\xe1);
+
+ # PNG (used in web pages)
+-png(1000000, \x50\x4e\x47\?, \xff\xfc\xfd\xfe);
++png(1000000, \?\x50\x4e\x47, \xff\xfc\xfd\xfe);
+
+ # BMP (used by MSWindows, use only if you have reason to think there are
+ # BMP files worth digging for. This often kicks back a lot of false
diff --git a/Changelog b/Changelog
new file mode 100644
index 000000000000..f4d0b4684a1e
--- /dev/null
+++ b/Changelog
@@ -0,0 +1,10 @@
+2013-05-10 Mariusz Libera <mariusz.libera@gmail.com>
+
+ 1.0.1-4:
+ * new maintainer
+ * updated PKGBUILD
+ * corrected man path
+ * removed empty dir
+ * added Debian patches
+ * added Changelog
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b620622be472
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Levente Polyak <levente[at]leventepolyak[dot]net>
+# Contributor: Mariusz Libera <mariusz.libera@gmail.com>
+# Contributor: Michael P <ptchinster@archlinux.us>
+# Contributor: Christoph Siegenthaler <csi@gmx.ch>
+# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
+pkgname=tcpxtract
+pkgver=1.0.1
+pkgrel=5
+pkgdesc="A tool for extracting files from network traffic"
+url="http://tcpxtract.sourceforge.net"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('libpcap')
+options=('!emptydirs')
+changelog=Changelog
+source=("http://sourceforge.net/projects/${pkgname}/files/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz/download"
+ '01_fixmanpage.patch'
+ '02-fix_png_header_bytes.patch'
+ 'conf_default_path.patch'
+ 'fix-excessive-sync.patch'
+ 'tcpxtract-fix-segfault.patch')
+sha256sums=('613aa6be39772b236d89c5ef377c27b10ac44d1c34731105599283862dfc05be'
+ 'efaba466fb36eef76e1c5071a83b82056d1604322a5a1edbe0824828ea0298e2'
+ 'dd36070732e433665543ef86a13e68823d3c661d3eea7db0785fcab055295944'
+ '3591411f1fba7caeb16f05f3e67fc716e1e8b525b118680ab103b1722cea50cf'
+ 'a50480e35d3fa9daffecd3681d161822c7926b652ed09fd7a62d7b909fffced7'
+ '8f5627378a29f5a111227a39ad5001a81195b11e74ec375924ce6c7ab96e1819')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ # apply patches
+ for file in ../*.patch
+ do
+ patch -i ${file}
+ done
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="$pkgdir" install
+}
+
diff --git a/conf_default_path.patch b/conf_default_path.patch
new file mode 100644
index 000000000000..a5c5e66212ff
--- /dev/null
+++ b/conf_default_path.patch
@@ -0,0 +1,12 @@
+--- tcpxtract.c.old 2006-03-10 02:10:06.000000000 +0100
++++ tcpxtract.c 2006-03-10 02:10:23.000000000 +0100
+@@ -48,7 +48,7 @@
+ #include "search.h"
+
+ #ifndef DEFAULT_CONFIG_FILE
+-#define DEFAULT_CONFIG_FILE "/usr/local/etc/tcpxtract.conf"
++#define DEFAULT_CONFIG_FILE "/etc/tcpxtract.conf"
+ #endif
+
+ extern FILE *yyin; /* the lex/yacc input file */
+
diff --git a/fix-excessive-sync.patch b/fix-excessive-sync.patch
new file mode 100644
index 000000000000..c6c27a79b0f5
--- /dev/null
+++ b/fix-excessive-sync.patch
@@ -0,0 +1,25 @@
+From: Nico Golde <nion@debian.org>
+Bug: http://bugs.debian.org/623140
+Description: remove excessive sync calls causing lots of disk activity and replace by fsync on closing the file.
+
+Index: tcpxtract-1.0.1/extract.c
+===================================================================
+--- tcpxtract-1.0.1.orig/extract.c 2011-04-19 16:07:25.000000000 +0200
++++ tcpxtract-1.0.1/extract.c 2011-04-19 16:10:21.000000000 +0200
+@@ -163,7 +163,6 @@
+ error("Quiting.");
+ }
+ elist->nwritten += nbytes;
+- sync();
+ }
+
+ /* remove all finished extracts from the list */
+@@ -182,6 +181,8 @@
+ eptr->next->prev = eptr->prev;
+ if (*elist == eptr)
+ *elist = eptr->next;
++
++ fsync(eptr->fd);
+ close(eptr->fd);
+ free(eptr);
+ }
diff --git a/tcpxtract-fix-segfault.patch b/tcpxtract-fix-segfault.patch
new file mode 100644
index 000000000000..abd1495d0122
--- /dev/null
+++ b/tcpxtract-fix-segfault.patch
@@ -0,0 +1,37 @@
+From: Chow Loong Jin <hyperair@ubuntu.com>
+Bug: http://bugs.debian.org/599746
+Description: fix segfaults due to uninitialized variables
+
+--- tcpxtract-1.0.1/sessionlist.c 2005-10-04 22:50:03.000000000 +0800
++++ tcpxtract-1.0.1-new/sessionlist.c 2010-10-11 03:14:18.071445668 +0800
+@@ -62,6 +62,10 @@
+ (*last_slist)->prev = slist_ptr;
+ (*last_slist)->next = NULL;
+ (*last_slist)->srchptr_list = NULL;
++ (*last_slist)->extract_list = NULL;
++ (*last_slist)->recording = 0;
++ (*last_slist)->last_recvd = 0;
++ (*last_slist)->last_seqnum = 0;
+ return *last_slist;
+ }
+
+--- tcpxtract-1.0.1/tcpxtract.c 2005-10-06 09:44:39.000000000 +0800
++++ tcpxtract-1.0.1-new/tcpxtract.c 2010-10-11 03:03:52.741420701 +0800
+@@ -237,7 +237,7 @@
+ {
+ int c;
+ char *capfname = NULL; /* Capture file for input */
+- char *dev; /* Sniffing devise */
++ char *dev = NULL; /* Sniffing devise */
+ char errbuf[PCAP_ERRBUF_SIZE]; /* Error buffer */
+
+ struct bpf_program filter; /* hold compiled program */
+@@ -283,7 +283,7 @@
+ break;
+ case 'o':
+ if (optarg[strlen(optarg) - 1] != '/') {
+- output_prefix = emalloc(strlen(optarg) + 1);
++ output_prefix = emalloc(strlen(optarg) + 2);
+ strcpy(output_prefix, optarg);
+ output_prefix[strlen(optarg)] = '/';
+ output_prefix[strlen(optarg) + 1] = '\0';