debian/0000755000000000000000000000000011661714301007166 5ustar debian/compat0000644000000000000000000000000211456627577010410 0ustar 7 debian/source/0000755000000000000000000000000011456627571010504 5ustar debian/source/format0000644000000000000000000000001411456627577011720 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000231311456627577011144 0ustar This package was debianized by Nico Golde on Sun, 16 Oct 2005 19:49:29 +0200. It was downloaded from http://tcpxtract.sf.net Upstream Author: Nick Harbour Copyright: Copyright (C) 2005 Nick Harbour License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is Copyright (C) 2005-2009, Nico Golde and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. debian/watch0000644000000000000000000000007211456627577010242 0ustar version=3 http://sf.net/tcpxtract/tcpxtract-(.+)\.tar\.gz debian/rules0000755000000000000000000000275311456634325010266 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS += -DDEFAULT_CONFIG_FILE=\\\"/etc/tcpxtract.conf\\\" -Wall -g -Wl,-z,defs include /usr/share/quilt/quilt.make ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: patch configure dh_testdir CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --bindir=/usr/sbin build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch build-stamp clean: unpatch dh_testdir dh_testroot rm -f build-stamp config.guess #ifneq "$(wildcard /usr/share/misc/config.sub)" "" # cp -f /usr/share/misc/config.sub config.sub #endif [ ! -f Makefile ] || $(MAKE) distclean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/tcpxtract # Build architecture-independent files here. binary-indep: build install # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs AUTHORS dh_installman dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/README.source0000644000000000000000000000045011456633561011356 0ustar The changes to the upstream source of this Debian package are managed by the patch management system 'quilt'. See the dpatch documentation at /usr/share/doc/quilt/README.source for further information on how to comfortably create new patches or edit existing ones. -- Nico Golde, 17 October 2010 debian/control0000644000000000000000000000137311661714301010575 0ustar Source: tcpxtract Section: net Priority: optional Maintainer: Nico Golde Build-Depends: debhelper (>= 7.0.0), autotools-dev, libpcap0.8-dev, flex, quilt Standards-Version: 3.9.2 Homepage: http://tcpxtract.sf.net Package: tcpxtract Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: extracts files from network traffic based on file signatures tcpxtract is a fast console tool to extract files from network traffic based on file headers and footers (so called carving). 26 file formats are supported out of the box by tcpxtract but new formats can be added without problems. Foremost configurations are simple to convert to tcpxtracts configuration files. . It uses libpcap and it can be used with tcpdump files. debian/patches/0000755000000000000000000000000011661714077010627 5ustar debian/patches/series0000644000000000000000000000015011661713752012037 0ustar 01_fixmanpage.patch tcpxtract-fix-segfault.patch fix-excessive-sync.patch 02-fix_png_header_bytes.patch debian/patches/fix-excessive-sync.patch0000644000000000000000000000145611553314404015400 0ustar From: Nico Golde 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); } debian/patches/02-fix_png_header_bytes.patch0000644000000000000000000000120611661714071016230 0ustar 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 debian/patches/tcpxtract-fix-segfault.patch0000644000000000000000000000271611553314524016257 0ustar From: Chow Loong Jin 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'; debian/patches/01_fixmanpage.patch0000644000000000000000000000176211553314315014264 0ustar From: Nico Golde 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 \fR] [\fI-f \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. debian/changelog0000644000000000000000000000445611661714127011057 0ustar tcpxtract (1.0.1-8) unstable; urgency=low * Fix incorrect PNG header magic values (Closes: #649249). -- Nico Golde Sat, 19 Nov 2011 12:51:31 +0100 tcpxtract (1.0.1-7) unstable; urgency=low * Fix excessive sync by only fsync'ing the specific output file (Closes: #623140). * Bump policy version, no changes needed. -- Nico Golde Tue, 19 Apr 2011 16:10:43 +0200 tcpxtract (1.0.1-6) unstable; urgency=low * Bump policy version, no changes needed. * Switch from dpatch to quilt. - Adapted README.source. * Switch to dpkg-source 3.0 (quilt) format * Add patch by Chow Loong Jin to prevent segfaults due to missing null initilizations (Closes: #599746). -- Nico Golde Sun, 17 Oct 2010 18:26:09 +0200 tcpxtract (1.0.1-5) unstable; urgency=low * Bump policy version, no changes needed. * Remove notice about info page from manpage (Closes: #549219). * Bump compat level to 7 and adjust debhelper dependency. * Version debian packaging license -> GPL-2. * Add patch descriptions. * dh_clean -l => dh_prep (dh_clean -k deprecated). * Add README.source dummy ;) -- Nico Golde Sun, 17 Oct 2010 18:07:01 +0200 tcpxtract (1.0.1-4) unstable; urgency=low * Switched from Homepage tag to the new Homepage control field. * Added dependency on dpatch and added dpatch stuff to rules. * Added a short description for the manpage that actually makes sense (01_fixmanpage.dpatch). * Fixed debian-rules-ignores-make-clean-error lintian warning. * Added AUTHORS to the installed files in doc. -- Nico Golde Fri, 16 Nov 2007 13:03:02 +0100 tcpxtract (1.0.1-3) unstable; urgency=low * Added watch file. * Fixed copyright year in copyright file. * Removed config.guess file from diff. -- Nico Golde Thu, 03 May 2007 18:59:54 +0200 tcpxtract (1.0.1-2) unstable; urgency=low * Changed maintainer address. * Fixed broken copyright file. * Bumped compat version to 5. * Bumped standards version, no changes needed. * Removed unneeded comments from rules. -- Nico Golde Sat, 17 Mar 2007 16:58:44 +0100 tcpxtract (1.0.1-1) unstable; urgency=low * Initial release (Closes: #333282). -- Nico Golde Sun, 16 Oct 2005 19:49:29 +0200