Upgrade Simple Shells

Using Python and stty options

# In rev shell
python -c 'import pty; pty.spawn("/bin/bash")'
# or
python3 -c 'import pty; pty.spawn("/bin/bash")'

# ctrl + z

# In terminal
stty raw -echo; fg;

# Back in rev shell
export TERM=xterm-256color
stty rows <num> columns <cols>

How to get rows and columns:

stty size

Leave a Reply

Your email address will not be published. Required fields are marked *