summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/cutter
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/cutter')
-rw-r--r--net-analyzer/cutter/Manifest2
-rw-r--r--net-analyzer/cutter/cutter-1.03-r1.ebuild29
-rw-r--r--net-analyzer/cutter/cutter-1.04.ebuild29
-rw-r--r--net-analyzer/cutter/files/cutter-1.03-debian.patch182
-rw-r--r--net-analyzer/cutter/metadata.xml5
5 files changed, 247 insertions, 0 deletions
diff --git a/net-analyzer/cutter/Manifest b/net-analyzer/cutter/Manifest
new file mode 100644
index 000000000000..8c9997656437
--- /dev/null
+++ b/net-analyzer/cutter/Manifest
@@ -0,0 +1,2 @@
+DIST cutter-1.03.tgz 13176 SHA256 4df4fac7c2208afafb279abb443005bf77d3dcf01af05fe1f2898213b9109615 SHA512 821e8abf496e22b86bdd855fb1c9c51648a276ebb572edd2ccb172ae7025a38794df37dfe153c1807785ecec279c34b9df5e2bcc2de582b3a88ee3776cf46eea WHIRLPOOL f66ef5df14f51656505949596f6e98f8fc48c85bb200d2b54be3a71e165900e14b7c4ca1f25242fe7592054f6d5b358db13f714cf000c7e70a626961f906d425
+DIST cutter-1.04.tgz 13680 SHA256 1b336c69eb3393f6ca118a529773014c41126ac6dabd04b77151daa1c2f01180 SHA512 79c17ec8c17e696a79aa8b11fda347f2e6929eb35f9a37da450acf6aff7ab9471e13eaef24708f90f3f0c2791fade2eb944443b98df3d3ae4eef0c408abc7b3a WHIRLPOOL 6efab2b2af413600c7ff0f8d998860d635248ab81a584a5a769a723d4c5e3558d463a40d1ff2a10cd4b2344af5e8e11ab676ca866bee3efd10ebe4c2c7fe2a29
diff --git a/net-analyzer/cutter/cutter-1.03-r1.ebuild b/net-analyzer/cutter/cutter-1.03-r1.ebuild
new file mode 100644
index 000000000000..61ed5ad2e425
--- /dev/null
+++ b/net-analyzer/cutter/cutter-1.03-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TCP/IP Connection cutting on Linux Firewalls and Routers"
+HOMEPAGE="http://www.digitage.co.uk/digitage/software/linux-security/cutter"
+SRC_URI="http://www.digitage.co.uk/digitage/files/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-debian.patch
+ rm -f Makefile # implicit rules are better ;x
+}
+
+src_compile() {
+ emake cutter CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin cutter
+ dodoc README
+ doman debian/cutter.8
+}
diff --git a/net-analyzer/cutter/cutter-1.04.ebuild b/net-analyzer/cutter/cutter-1.04.ebuild
new file mode 100644
index 000000000000..695fe9c9e3e3
--- /dev/null
+++ b/net-analyzer/cutter/cutter-1.04.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TCP/IP Connection cutting on Linux Firewalls and Routers"
+HOMEPAGE="http://www.digitage.co.uk/digitage/software/linux-security/cutter"
+SRC_URI="http://www.digitage.co.uk/digitage/files/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.03-debian.patch
+ rm -f Makefile # implicit rules are better ;x
+}
+
+src_compile() {
+ emake cutter CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin cutter
+ dodoc README
+ doman debian/cutter.8
+}
diff --git a/net-analyzer/cutter/files/cutter-1.03-debian.patch b/net-analyzer/cutter/files/cutter-1.03-debian.patch
new file mode 100644
index 000000000000..607e06df744f
--- /dev/null
+++ b/net-analyzer/cutter/files/cutter-1.03-debian.patch
@@ -0,0 +1,182 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ cutter: cutter.c
+- cc cutter.c -o cutter
++ cc $(CFLAGS) cutter.c -o cutter
+
+ clean:
+ rm -f cutter.o cutter
+--- a/cutter.c
++++ b/cutter.c
+@@ -57,6 +57,7 @@
+ #include <arpa/inet.h>
+ #include <net/if.h>
+ #include <errno.h>
++#include <time.h>
+
+ #define ETHHDR sizeof(struct ethhdr)
+ #define TCPHDR sizeof(struct tcphdr)
+@@ -149,7 +150,6 @@
+ int getmac(in_addr_t ip, uchar *mac)
+ {
+ FILE *id = fopen( "/proc/net/arp", "r" );
+- union { uchar c[4]; in_addr_t n; } ipu;
+ in_addr_t ipn;
+ int mac0, mac1, mac2, mac3, mac4, mac5;
+ int hwtype, flags;
+@@ -240,7 +240,7 @@
+ u_short toport
+ )
+ {
+- int i_result, raw_sock, rtn;
++ int i_result, raw_sock;
+ in_addr_t gateway_ip;
+ struct sockaddr_ll myaddr, hisaddr;
+ struct tpack tpack;
+@@ -377,7 +377,7 @@
+
+ for ( ; time(0) < tstart + 15; ) { // give the peer 15 seconds to respond
+ struct sockaddr_ll gotaddr;
+- int addrlen = sizeof(gotaddr);
++ unsigned int addrlen = sizeof(gotaddr);
+ fd_set readfds;
+ struct timeval tv;
+
+@@ -478,8 +478,7 @@
+ {
+ FILE *id = fopen( "/proc/net/ip_conntrack", "r" );
+ char src1[32], dst1[32], src2[32], dst2[32];
+- int sport1, dport1, sport2, dport2, i;
+- int packets1, packets2, bytes1, bytes2;
++ int sport1, dport1, sport2, dport2;
+ in_addr_t src1n, src2n, dst1n, dst2n;
+ char buff[1024], *p;
+ int found = 0;
+--- a/debian/cutter.8
++++ b/debian/cutter.8
+@@ -0,0 +1,124 @@
++.\" Hey, EMACS: -*- nroff -*-
++.TH CUTTER 8 "April, 2005"
++.SH NAME
++cutter \- cut tcp/ip connections
++.SH SYNOPSIS
++.B cutter
++.IR ipaddress1 \ [ \ port1 \ [ \ ipaddress2 \ [ \ port2
++\ ] \ ] \ ]
++.br
++.SH DESCRIPTION
++.B Cutter
++is an open source program that allows Linux firewall
++administrators to abort TCP/IP connections routed over the firewall or
++router on which it is run.
++.br
++.SH WARNING
++.B Cutter
++has been designed for use as a administrators tool for Linux
++firewalls. It's use (as is, or modified) for any other purpose is not
++sanctioned by the author. So - do not use this tool as a parachute, or
++to dry your cat, chill meat, answer your phone, drive you car, teach
++your kids to read or attack other people's computer systems or networks.
++.PP
++This software has been designed for
++.I legal
++and
++.I appropriate
++use
++by network security administrators and the like. It has been written as
++part of a larger Linux firewall project, targetting at controlling traffic
++from peer-to-peer software such as Kazaa, iMesh and others into and out of
++a private network. It is not designed as a tool for malicious use and the
++author in no way sanctions such use.
++.PP
++Users of the software should be aware that it's actions are easily detectable
++using a number of readily available network monitoring tools, and it makes no
++attempt to disguise it's actions. Malicious use of "cutter" could result in a
++jail sentance in a number of countries around the world.
++.PP
++The author is not responsible for the results of using this software. It
++is provided "as is" in the hope that it will be useful, but no garantees
++are made about it's use.
++.br
++.SH USAGE
++.B Cutter
++can be called using one of the following four syntaxes.
++
++.BI cutter \ ip-address
++
++.B Example:
++.RS
++.br
++.BI cutter \ 10.10.0.45
++
++Cuts all connections
++passing through the firewall
++between any ports on the specified ip-address (either a "private" or
++"public" address) and any other hosts. This can be used to close down
++all incoming connections to a particular server, all outgoing
++connections from a particular client or all outgoing connections to a
++server.
++.RE
++
++.B cutter
++.I ip-address port
++
++.B Example:
++.RS
++.br
++.B cutter
++.I 200.1.2.3 80
++
++Cuts all connections to or from the
++specified ip-address/port pair. This allows the user to be a little more
++specific than the previous example and allows targetting of specific
++services on specific hosts.
++.RE
++
++.B cutter
++.I ip-address-1 port-1 ip-address-2
++
++.B Example:
++.RS
++.br
++.B cutter
++.I 200.1.2.3 22 10.10.0.45
++
++Cuts all connections between
++ip-address-2 and ip-address-1/port-1. This allows the user to cut
++connections between a specified "client" and a particular service on a
++specified host. Our example closes host 10.10.0.45's SSH connection to
++server 200.1.2.3.
++.RE
++
++.B cutter
++.I ip-address-1 port-1 ip-address-2 port-2
++
++.B Example:
++.RS
++.br
++.B cutter
++.I 200.1.2.3 22 10.10.0.45 32451
++
++Cuts the specific connection between
++the two ip/port number pairs given.
++.RE
++.SH STATUS
++Cutter 1.03 should be considered
++.B EXPERIMENTAL.
++The author is releasing a
++tool that works on the systems he has access to (namely: IPCop and
++RedHat Linux), and he is seeking input on it's use on other systems,
++ideas for improvement, offers of sponsorship - etc.
++.PP
++.br
++.SH ADDITIONAL DOCUMENTATION
++This program is documented at
++.UR http://www.lowth.com/cutter/
++.I http://www.lowth.com/cutter/
++.UE
++.SH AUTHOR
++Blars Blarson addapted the README and web page written by Chris Lowth
++into this man page for debian package of cutter. This man page may be
++distribuated under the terms of the Gnu GPL version 2.
diff --git a/net-analyzer/cutter/metadata.xml b/net-analyzer/cutter/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/cutter/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>