debian/0000755000000000000000000000000012170321330007156 5ustar debian/manpages0000644000000000000000000000002012170321330010664 0ustar debian/netsed.1 debian/rules0000755000000000000000000000107112170321330010235 0ustar #!/usr/bin/make -f # -*- makefile -*- # debian/rules for netsed by Mats Erik Andersson and # Arno Töll . # Written from scratch and adapted to debhelper 8. # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS = $(shell dpkg-buildflags --get CFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) export CPPFLAGS CFLAGS LDFLAGS pkg = netsed %: dh $@ override_dh_auto_install: install $(pkg) debian/$(pkg)/usr/bin override_dh_installchangelogs: dh_installchangelogs NEWS debian/watch0000644000000000000000000000013012170321330010201 0ustar version=3 http://silicone.homelinux.org/release/netsed/netsed-([.0-9]+[a-z]?)\.tar\.gz debian/netsed.lintian-overrides0000644000000000000000000000011112170321330014011 0ustar netsed: spelling-error-in-binary usr/bin/netsed informations information debian/source/0000755000000000000000000000000012170321330010456 5ustar debian/source/format0000644000000000000000000000001412170321330011664 0ustar 3.0 (quilt) debian/NEWS0000644000000000000000000000124612170321330007660 0ustar netsed (1.00b-2) unstable; urgency=low An updated manual page has been generated directly from my own Docbook source. -- Mats Erik Andersson Wed, 22 Jun 2011 20:20:19 +0200 netsed (1.00b-1) unstable; urgency=low This package is now based on the efforts of a new upstream author, having forked the stale original, and having continued the development from that point. This makes the shipped manual page outdated, since I myself am aiding upstream in writing the new documenta- tion. It will enter only with the next upstream release. -- Mats Erik Andersson Sat, 11 Jun 2011 02:26:38 +0200 debian/copyright0000644000000000000000000000273612170321330011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: netsed Upstream-Contact: Julien Viard de Galbert Source: http://silicone.homelinux.org/release/netsed/ In 2010 Julien Viard de Galbert officially forked the original dormant software and began eliminating bugs and renewed the development. Files: * Copyright: 2002, Michal Zalewski 2010, Julien Viard de Galbert License: GPL-2+ Files: debian/* Copyright: 2001, Gergely Nagy 2001 - 2002, Lenart Janos 2010, Tim Retout 2011, Arno Töll License: GPL-2+ Comment: This package was debianized by Lenart Janos from scratch on Sat, 24 Nov 2001 18:25:49 +0100. It was originally debianized by Gergely Nagy on Sat, 23 Jun 2001 10:47:53 +0200. . It was then downloaded from http://lcamtuf.na.export.pl/netsed.tgz. License: GPL-2+ 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; either version 2 of the License, or (at your option) any later version. . On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2' debian/netsed.10000644000000000000000000001217712170321330010532 0ustar '\" t .\" Title: netsed .\" Author: Mats Erik Andersson .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: July 5th, 2013 .\" Manual: NetSED .\" Source: NetSED 1.1 .\" Language: English .\" .TH "NETSED" "1" "July 5th, 2013" "NetSED 1\&.1" "NetSED" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" netsed \- a network stream editor\&. .SH "SYNOPSIS" .HP \w'\fBnetsed\fR\ 'u \fBnetsed\fR {\fIproto\fR} {\fIlport\fR} {\fIrhost\fR} {\fIrport\fR} {\fIrule\fR} [\fIrule\fR\ \&.\&.\&.] .SH "DESCRIPTION" .PP \fBnetsed\fR is a small and handy utility to alter, in real time, the contents of packets forwarded in a network stream, or in a datagram connection\&. When called with a set of replacement rules, these rules are tested for applicability to each packet entering in either direction\&. .SH "ARGUMENTS" .PP \fIproto\fR .RS 4 Determines the protocol for the desired connection: "tcp", "TCP", "udp", or "UDP"\&. .RE .PP \fIlport\fR .RS 4 The local listening port for the connection\&. A service name, or a numerical port value, is acceptable\&. .RE .PP \fIrhost\fR .RS 4 The remote host with whom the connection is desired\&. Resolvable host names and IPv4/IPv6 addresses are equally usable\&. .sp As a special case, assigning "0" to \fIrhost\fR will insert the kernel\*(Aqs knowledge of the targeted host address, in a situation where a netfilter rule is redirecting traffic\&. This happens when running a transparent proxy service\&. .RE .PP \fIrport\fR .RS 4 The remote port to connect to\&. A service name, or a numerical port value, is acceptable\&. .sp Also here a value "0" will be acceptable to arrange a transparent proxy service, as the kernel\*(Aqs tracking will provide the intended remote port number\&. .RE .PP \fIrule\fR .RS 4 At least one replacement rule is mandatory\&. The general syntax for this is: .sp .if n \{\ .RS 4 .\} .nf s/pat1/pat2[/num] .fi .if n \{\ .RE .\} .sp The effect is to replace the text that matches \fIpat1\fR with the expansion of \fIpat2\fR\&. The optional parameter \fInum\fR is a numerical value limiting the maximal number of times the rule can be applied\&. One could say that the rule \fIexpires\fR after \fInum\fR occurrences\&. .sp The rules are applied in succession to all passing packets, flowing in either direction\&. As soon as a rule has been expired, it is removed from the collection of active rules for the current connection\&. Observe that any counter is started as the connection is initiated, running as long as the connection is alive\&. .sp This holds directly for TCP connections, whereas for UDP a connection is considered to consist of incoming data on fixed address and fixed port together with any response from a remote server\&. When no datagrams have been transmitted for a period of 30 seconds, the UPD connection is seen as closed\&. .sp A single rule is limited to act on individual packets; a pattern can not match across packet boundaries\&. .sp Using HTTP\-like escape sequences for hexadecimal values, all eight\-bit characters are viable in the patterns\&. Thus the standard character pair CRNL would code as "%0a%0d"\&. In a pattern, the percentage sign itself must be escaped by duplication\&. Thus a string "%%" is interpreted in a pattern as a literal percentage sign\&. .RE .SH "EXAMPLES" .PP A handful replacement rules are handy as examples\&. .PP s/andrew/mike .RS 4 Replace every occurrence of the string "andrew" with "mike", in every passing packet\&. .RE .PP s/andrew/mike/1 .RS 4 Replace only the first occurrence of the string "andrew" for "mike" in each packet\&. Any repetition is unaltered, unless a further rule specifies some replacement\&. .RE .PP s/andrew/mike%00%00 .RS 4 Replace in each packet every occurrence of the string "andrew" with "mike\ex00\ex00" \&. The padding with two null bytes ensures an unaltered packet length, which might be essential at times\&. .RE .PP s/%%/%2f/20 .RS 4 Replace the first twenty occurrences of the percentage character \*(Aq%\*(Aq with slashes \*(Aq/\*(Aq\&. .RE .SH "AUTHOR" .PP This text was initially compiled by Mats Erik Andersson as a Docbook source from the usage printout\&. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 2, or of a later version\&. .SH "COPYRIGHT" .br Copyright \(co 2010 Mats Erik Andersson .br debian/patches/0000755000000000000000000000000012170321330010605 5ustar debian/patches/series0000644000000000000000000000002412170321330012016 0ustar # No local patches! debian/docs0000644000000000000000000000001412170321330010024 0ustar README TODO debian/control0000644000000000000000000000255212170321330010565 0ustar Source: netsed Section: net Priority: optional Maintainer: Mats Erik Andersson Standards-Version: 3.9.4 Build-Depends: debhelper (>= 8.0.0~), ruby, procps, dpkg-dev (>= 1.15.7) Homepage: http://silicone.homelinux.org/projects/netsed/ Vcs-Git: git://anonscm.debian.org/collab-maint/netsed.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/netsed.git Package: netsed Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: network packet-altering stream editor NetSED is a small and handy utility designed to alter, in real time, the contents of packets forwarded through your network. It is really useful for network packet alteration, forging, or manipulation. NetSED supports: . * black-box protocol auditing - whenever there are two or more proprietary boxes communicating using some undocumented protocol. By enforcing changes in ongoing transmissions, you will be able to test if the examined application can be claimed secure; * fuzz generating experiments, integrity tests - whenever you do stability tests of an application to see how it cares for data integrity; * other common use-cases: deceptive transfers, content filtering, protocol conversion - whatever best fits your task at hand. . It ideally complements a tool suite based on ngrep, netcat, and tcpdump. debian/changelog0000644000000000000000000001103112170321330011024 0ustar netsed (1.1-1) unstable; urgency=low * Standards-Version 3.9.4. No changes were needed. * Remove obsolete DM-Upload-Allowed. * All patches have been applied by upstream author. * debian/netsed.1: Updated manual page. * [lintian] Spell-checking. + debian/netsed.lintian-overrides: New file. -- Mats Erik Andersson Sat, 13 Jul 2013 20:55:22 +0200 netsed (1.00b-3) unstable; urgency=low * Acknowledge recent non-maintainer upload. * Hardened compiler flags. + debian/control: Build depends on dpkg-dev (>= 1.15.7). + debian/rules: Set compiler flags using dpkg-buildflags. * debian/control: Standards 3.9.3, no changes. * debian/copyright: + Set "GPL-2+" as name of common standalone license. + Use the official URL as format specification. -- Mats Erik Andersson Thu, 02 Aug 2012 03:27:27 +0200 netsed (1.00b-2.1) unstable; urgency=low * Non-maintainer upload. * Add 05-ftbfs_ruby1.9_testsuite_require_syntax.diff to adjust to changes in the Ruby 1.9 require syntax. (Closes: #676126) * Build-Depend on procps - ps is used within test/tc_system.rb. -- Sven Hoexter Sun, 08 Jul 2012 14:59:24 +0200 netsed (1.00b-2) unstable; urgency=low * debian/control: Improve description. * debian/rules: Remove my email address. * debian/NEWS: New file. * debian/netsed.1: Update manpage to give present capabilities. * debian/patches/: + 03-traditional_rule.diff: Less strict rule spelling. + 04-check_dual_stack.diff: Avoid unintended dual family stack. -- Mats Erik Andersson Wed, 24 Aug 2011 20:54:28 +0200 netsed (1.00b-1) unstable; urgency=low [Arno Töll] * Switch to dpkg-source format '3.0 (quilt)'. * Write rules file from scratch, based on 'dh'. * Compatibility and dependency on debhelper (>=8.0.0~). * Bump standards to 3.9.2. [Mats Erik Andersson] * New maintainer. Thanks to all prior maintainers and contributors. (Closes: #487339) * debian/patches/: + 01-cflag_inclusion.diff: Sense any exported CFLAGS. + 02-ftbfs_kfreebsd.diff: Resolve FTBFS for GNU/kfreebsd. * debian/copyright: + Rewritten according to DEP-5. * debian/watch: + New file. * debian/control: + Homepage stanza. + Vcs-*: New stanzas. + Add ruby build dependency + Reformulate description. [Sven Hoexter] * debian/control: + Make the short description dev-ref compliant. + Update Vcs-* stanzas. + Add DM-Upload-Allowed: yes. [Tim Retout] * New upstream release from a new maintainer: + Fix "netsed executes a tight non-blocking loop.": Change to new upstream source. (Closes: #586037) + Fix "hostnames resolved as 255.255.255.255", patch by Mats Erik Andersson. (Closes: #397420) -- Mats Erik Andersson Fri, 10 Jun 2011 23:49:16 +0200 netsed (0.01c-2.1) unstable; urgency=low * Non-maintainer upload. * debian/rules: fix bashisms (use of {,}) (Closes: #375570) -- Lucas Nussbaum Mon, 14 Jan 2008 15:16:15 +0100 netsed (0.01c-2) unstable; urgency=low * Manpage typos fixed. (closes: Bug#170847) -- Lenart Janos Wed, 27 Nov 2002 14:14:45 +0100 netsed (0.01c-1) unstable; urgency=medium * Re-release under GPL (administrative). (closes: Bug#166669) * Upgraded Standards-Version. * Removed debian/{postinst,prerm}. -- Lenart Janos Mon, 25 Nov 2002 18:34:55 +0100 netsed (0.01b-5) unstable; urgency=low * Fixed buggy debian/{pre,post}{inst,rem}. (closes: Bug#126957) -- Lenart Janos Tue, 1 Jan 2002 19:51:31 +0100 netsed (0.01b-4) unstable; urgency=low * Typo fixed in the description. (closes: Bug#125183) -- Lenart Janos Sat, 22 Dec 2001 16:13:00 +0100 netsed (0.01b-3) unstable; urgency=low * Adopted package. (closes: Bug#120654) * Re-debianized from scratch. -- Lenart Janos Sat, 24 Nov 2001 18:17:44 +0100 netsed (0.01b-2) unstable; urgency=low * Oops. Corrected debian/control, so long description refers to ngrep, not netgrep (Closes: #112120) * Bumped up Standards-Version while there -- Gergely Nagy Sat, 15 Sep 2001 15:45:44 +0200 netsed (0.01b-1) unstable; urgency=low * Initial release, for Master to take over the world (Closes: #101959) -- Gergely Nagy Sat, 23 Jun 2001 10:47:53 +0200 debian/dirs0000644000000000000000000000001112170321330010032 0ustar usr/bin/ debian/compat0000644000000000000000000000000212170321330010354 0ustar 8