diff options
author | will <will@FreeBSD.org> | 2001-03-11 03:44:15 +0800 |
---|---|---|
committer | will <will@FreeBSD.org> | 2001-03-11 03:44:15 +0800 |
commit | 12dd28be8d6c3c0a784bdd6efe1218bf19e247dc (patch) | |
tree | 628b7bc0e4f8e5f356161917243ce2abb08c515b | |
parent | e49eec295ebfee2017a9796428a1850f592ce248 (diff) | |
download | freebsd-ports-gnome-12dd28be8d6c3c0a784bdd6efe1218bf19e247dc.tar.gz freebsd-ports-gnome-12dd28be8d6c3c0a784bdd6efe1218bf19e247dc.tar.zst freebsd-ports-gnome-12dd28be8d6c3c0a784bdd6efe1218bf19e247dc.zip |
Add netsed 0.01, a program that alters the contents of packets in
real-time.
PR: 24178
Submitted by: Roman Shterenzon <roman@xpert.com>
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/netsed/Makefile | 27 | ||||
-rw-r--r-- | net/netsed/distinfo | 1 | ||||
-rw-r--r-- | net/netsed/files/patch-Makefile | 7 | ||||
-rw-r--r-- | net/netsed/files/patch-netsed.c | 29 | ||||
-rw-r--r-- | net/netsed/pkg-comment | 1 | ||||
-rw-r--r-- | net/netsed/pkg-descr | 18 | ||||
-rw-r--r-- | net/netsed/pkg-plist | 3 |
8 files changed, 87 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 7eae85fae1fe..6a10c85784b9 100644 --- a/net/Makefile +++ b/net/Makefile @@ -173,6 +173,7 @@ SUBDIR += netpipes SUBDIR += netsaint SUBDIR += netsaint-plugins + SUBDIR += netsed SUBDIR += nettest SUBDIR += ngrep SUBDIR += nocol diff --git a/net/netsed/Makefile b/net/netsed/Makefile new file mode 100644 index 000000000000..6784593415c3 --- /dev/null +++ b/net/netsed/Makefile @@ -0,0 +1,27 @@ +# Ports collection makefile for: netsed +# Date created: Jan 9 2000 +# Whom: Roman Shterenzon <roman@xpert.com> +# +# $FreeBSD$ +# + +PORTNAME= netsed +PORTVERSION= 0.01 +CATEGORIES= net security +MASTER_SITES= http://dione.ids.pl/~lcamtuf/ \ + http://lcamtuf.na.export.pl/ +DISTNAME= ${PORTNAME} +EXTRACT_SUFX= .tgz + +MAINTAINER= roman@xpert.com + +WRKSRC= ${WRKDIR} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/netsed ${PREFIX}/bin +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/netsed + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/netsed +.endif + +.include <bsd.port.mk> diff --git a/net/netsed/distinfo b/net/netsed/distinfo new file mode 100644 index 000000000000..542dea40d89b --- /dev/null +++ b/net/netsed/distinfo @@ -0,0 +1 @@ +MD5 (netsed.tgz) = 56f5d8af7d21dbb25a50e673442edc30 diff --git a/net/netsed/files/patch-Makefile b/net/netsed/files/patch-Makefile new file mode 100644 index 000000000000..86782e2d7991 --- /dev/null +++ b/net/netsed/files/patch-Makefile @@ -0,0 +1,7 @@ +--- Makefile.orig Tue Jan 9 12:04:29 2001 ++++ Makefile Tue Jan 9 12:04:36 2001 +@@ -1,4 +1,4 @@ +-CFLAGS = -Wall -fomit-frame-pointer -O9 ++CFLAGS ?= -Wall -fomit-frame-pointer -O9 + + all: netsed diff --git a/net/netsed/files/patch-netsed.c b/net/netsed/files/patch-netsed.c new file mode 100644 index 000000000000..88c7b6ba5c8d --- /dev/null +++ b/net/netsed/files/patch-netsed.c @@ -0,0 +1,29 @@ +--- netsed.c.orig Tue Jan 9 11:30:40 2001 ++++ netsed.c Tue Jan 9 11:43:41 2001 +@@ -134,8 +134,10 @@ + + + void bind_and_listen(int tcp,int port) { ++ int on=1; + struct sockaddr_in laddr; + lsock=socket(PF_INET,tcp ? SOCK_STREAM:SOCK_DGRAM,0); ++ setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)); + fcntl(lsock,F_SETFL,O_NONBLOCK); + laddr.sin_family = PF_INET; + laddr.sin_port = htons (port); +@@ -186,7 +188,6 @@ + rd=read(s1,buf,sizeof(buf)); + if (rd<0 && errno!=EAGAIN) return 0; // s1 not connected + if (rd>0) { +- fcntl(s2,F_SETFL,O_SYNC); + printf("[+] Caught server -> client packet.\n"); + rd=sed_the_buffer(rd); + if (write(s2,b2,rd)<=0) return 0; // not able to send +@@ -195,7 +196,6 @@ + rd=read(s2,buf,sizeof(buf)); + if (rd<0 && errno!=EAGAIN) return 0; // s2 not connected + if (rd>0) { +- fcntl(s1,F_SETFL,O_SYNC); + printf("[+] Caught client -> server packet.\n"); + rd=sed_the_buffer(rd); + if (write(s1,b2,rd)<=0) return 0; // not able to send diff --git a/net/netsed/pkg-comment b/net/netsed/pkg-comment new file mode 100644 index 000000000000..754af1d4aa92 --- /dev/null +++ b/net/netsed/pkg-comment @@ -0,0 +1 @@ +Alters the contents of packets in real-time diff --git a/net/netsed/pkg-descr b/net/netsed/pkg-descr new file mode 100644 index 000000000000..e69c7f4c6675 --- /dev/null +++ b/net/netsed/pkg-descr @@ -0,0 +1,18 @@ +NetSED is small and handful utility designed to alter the contents of +packets forwarded thru your network in real time. It is really useful +for network hackers in following applications: + + * black-box protocol auditing - whenever there are two or more + propertiary boxes communicating over undocumented protocol (by enforcing + changes in ongoing transmissions, you will be able to test if tested + application is secure), + + * fuzz-alike experiments, integrity tests - whenever you want to test + stability of the application and see how it ensures data integrity, + + * other common applications - fooling other people, content filtering, + etc etc - choose whatever you want to. + +WWW: http://dione.ids.pl/~lcamtuf/ + +Roman Shterenzon <roman@xpert.com> diff --git a/net/netsed/pkg-plist b/net/netsed/pkg-plist new file mode 100644 index 000000000000..97e716a28b3b --- /dev/null +++ b/net/netsed/pkg-plist @@ -0,0 +1,3 @@ +bin/netsed +%%PORTDOCS%%share/doc/netsed/README +%%PORTDOCS%%@dirrm share/doc/netsed |