Manually upgrade a shell
Once inside the shell, use the following commands:
- Spawn a bash shell
$ python -c 'import pty;pty.spawn("/bin/bash")'
- Set the TERM
In another terminal, use echo $TERM
. Let's say the output is xterm
.
xxx@yyy:path$ export TERM=xterm
xxx@yyy:path$ clear # now available
- Manually resize your terminal
Open another terminal, resize it and use stty -a
.
xxx@yyy:path$ stty rows n
xxx@yyy:path$ stty cols m
- Configure CTRL-C to not kill the shell
xxx@yyy:path$ # CTRL+Z
kali@kali:/tmp$ stty raw -echo; fg
xxx@yyy:path$ # can use CTRL+C / ...
- Once finished, and you want to kill the shell
xxx@yyy:path$ exit
kali@kali:/tmp$ reset # restore your terminal
π You may have to close your terminal if it doesn't respond.