Last active
May 9, 2022 23:02
-
-
Save Esonhugh/5d78e5d81669230997a87c022ba59e3b to your computer and use it in GitHub Desktop.
pwnsh for good wraper for the reverse netcat shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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