Skip to content

Instantly share code, notes, and snippets.

@Esonhugh
Last active May 9, 2022 23:02
Show Gist options
  • Save Esonhugh/5d78e5d81669230997a87c022ba59e3b to your computer and use it in GitHub Desktop.
Save Esonhugh/5d78e5d81669230997a87c022ba59e3b to your computer and use it in GitHub Desktop.
pwnsh for good wraper for the reverse netcat shell
function pwnsh(){
case "$1" in
nc)
rlwrap $*
;;
tty)
stty -raw echo;fg
;;
re)
stty raw -echo
;;
py)
echo "python -c 'import pty;pty.spawn(\"/bin/bash\")'"
;;
*)
echo ========================
echo $0
echo ========================
echo "pwnshell for your pentesting"
echo "1. rlwrap nc => $0 nc"
echo "2. Ctrl-z "
echo "3. stty -raw echo;fg => $0 tty"
echo "4. python -c 'import pty;pty.spawn(\"/bin/bash\")' ==> py"
echo ========================
;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment