diff options
author | cvs2svn <admin@example.com> | 1999-03-26 18:24:03 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 1999-03-26 18:24:03 +0000 |
commit | 3fc228fb4c1a39aceaee3d7013365042a6077bd0 (patch) | |
tree | af769f6648929b3b2c1f9e053a3754fa989ce302 /src/usr.bin/nc/scripts/dist.sh | |
parent | 536c76cbb863bab152f19842ab88772c01e922c7 (diff) | |
download | openbsd-OPENBSD_2_5.tar.gz openbsd-OPENBSD_2_5.tar.bz2 openbsd-OPENBSD_2_5.zip |
This commit was manufactured by cvs2git to create branch 'OPENBSD_2_5'.OPENBSD_2_5
Diffstat (limited to 'src/usr.bin/nc/scripts/dist.sh')
-rw-r--r-- | src/usr.bin/nc/scripts/dist.sh | 23 |
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 | |||
8 | PORT=31337 | ||
9 | |||
10 | sleep 1 | ||
11 | SRC=`tail -1 dist.log` | ||
12 | echo "<36>elite: ${SRC}" | ./nc -u -w 1 localhost 514 > /dev/null 2>&1 | ||
13 | echo ";;; Hi, ${SRC}..." | ||
14 | echo ";;; This is a PRERELEASE version of 'netcat', tar/gzip/uuencoded." | ||
15 | echo ";;; Unless you are capturing this somehow, it won't do you much good." | ||
16 | echo ";;; Ready?? Here it comes! Have phun ..." | ||
17 | sleep 8 | ||
18 | cat dist.file | ||
19 | sleep 1 | ||
20 | ./nc -v -l -p ${PORT} -e dist.sh < /dev/null >> dist.log 2>&1 & | ||
21 | sleep 1 | ||
22 | echo "<36>elite: done" | ./nc -u -w 1 localhost 514 > /dev/null 2>&1 | ||
23 | exit 0 | ||