summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/scripts/dist.sh
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>1999-03-26 18:24:02 +0000
committercvs2svn <admin@example.com>1999-03-26 18:24:02 +0000
commit31dbf5249c74bc884a4f1c6fbb3f13ae58d67022 (patch)
treeaf769f6648929b3b2c1f9e053a3754fa989ce302 /src/usr.bin/nc/scripts/dist.sh
parent536c76cbb863bab152f19842ab88772c01e922c7 (diff)
downloadopenbsd-OPENBSD_2_5_BASE.tar.gz
openbsd-OPENBSD_2_5_BASE.tar.bz2
openbsd-OPENBSD_2_5_BASE.zip
This commit was manufactured by cvs2git to create tag 'OPENBSD_2_5_BASE'.OPENBSD_2_5_BASE
Diffstat (limited to '')
-rw-r--r--src/usr.bin/nc/scripts/dist.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/usr.bin/nc/scripts/dist.sh b/src/usr.bin/nc/scripts/dist.sh
new file mode 100644
index 0000000000..4d2534a0e3
--- /dev/null
+++ b/src/usr.bin/nc/scripts/dist.sh
@@ -0,0 +1,23 @@
1#! /bin/sh
2## This is a quick example listen-exec server, which was used for a while to
3## distribute netcat prereleases. It illustrates use of netcat both as a
4## "fake inetd" and a syslogger, and how easy it then is to crock up a fairly
5## functional server that restarts its own listener and does full connection
6## logging. In a half-screen of shell script!!
7
8PORT=31337
9
10sleep 1
11SRC=`tail -1 dist.log`
12echo "<36>elite: ${SRC}" | ./nc -u -w 1 localhost 514 > /dev/null 2>&1
13echo ";;; Hi, ${SRC}..."
14echo ";;; This is a PRERELEASE version of 'netcat', tar/gzip/uuencoded."
15echo ";;; Unless you are capturing this somehow, it won't do you much good."
16echo ";;; Ready?? Here it comes! Have phun ..."
17sleep 8
18cat dist.file
19sleep 1
20./nc -v -l -p ${PORT} -e dist.sh < /dev/null >> dist.log 2>&1 &
21sleep 1
22echo "<36>elite: done" | ./nc -u -w 1 localhost 514 > /dev/null 2>&1
23exit 0