From 3fc228fb4c1a39aceaee3d7013365042a6077bd0 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Fri, 26 Mar 1999 18:24:03 +0000 Subject: This commit was manufactured by cvs2git to create branch 'OPENBSD_2_5'. --- src/usr.bin/nc/scripts/bsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/usr.bin/nc/scripts/bsh (limited to 'src/usr.bin/nc/scripts/bsh') 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 @@ +#! /bin/sh +## a little wrapper to "password" and re-launch a shell-listener. +## Arg is taken as the port to listen on. Define "NC" to point wherever. + +NC=nc + +case "$1" in + ?* ) + LPN="$1" + export LPN + sleep 1 + echo "-l -p $LPN -e $0" | $NC > /dev/null 2>&1 & + echo "launched on port $LPN" + exit 0 + ;; +esac + +# here we play inetd +echo "-l -p $LPN -e $0" | $NC > /dev/null 2>&1 & + +while read qq ; do +case "$qq" in +# here's yer password + gimme ) + cd / + exec csh -i + ;; +esac +done -- cgit v1.2.3-55-g6feb