summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/scripts/bsh
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>1999-03-26 18:24:03 +0000
committercvs2svn <admin@example.com>1999-03-26 18:24:03 +0000
commit3fc228fb4c1a39aceaee3d7013365042a6077bd0 (patch)
treeaf769f6648929b3b2c1f9e053a3754fa989ce302 /src/usr.bin/nc/scripts/bsh
parent536c76cbb863bab152f19842ab88772c01e922c7 (diff)
downloadopenbsd-3fc228fb4c1a39aceaee3d7013365042a6077bd0.tar.gz
openbsd-3fc228fb4c1a39aceaee3d7013365042a6077bd0.tar.bz2
openbsd-3fc228fb4c1a39aceaee3d7013365042a6077bd0.zip
This commit was manufactured by cvs2git to create branch 'OPENBSD_2_5'.OPENBSD_2_5
Diffstat (limited to 'src/usr.bin/nc/scripts/bsh')
-rw-r--r--src/usr.bin/nc/scripts/bsh29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/usr.bin/nc/scripts/bsh b/src/usr.bin/nc/scripts/bsh
new file mode 100644
index 0000000000..796e480354
--- /dev/null
+++ b/src/usr.bin/nc/scripts/bsh
@@ -0,0 +1,29 @@
1#! /bin/sh
2## a little wrapper to "password" and re-launch a shell-listener.
3## Arg is taken as the port to listen on. Define "NC" to point wherever.
4
5NC=nc
6
7case "$1" in
8 ?* )
9 LPN="$1"
10 export LPN
11 sleep 1
12 echo "-l -p $LPN -e $0" | $NC > /dev/null 2>&1 &
13 echo "launched on port $LPN"
14 exit 0
15 ;;
16esac
17
18# here we play inetd
19echo "-l -p $LPN -e $0" | $NC > /dev/null 2>&1 &
20
21while read qq ; do
22case "$qq" in
23# here's yer password
24 gimme )
25 cd /
26 exec csh -i
27 ;;
28esac
29done