Problems upgrading a Python tty shell in Kali 2022.2
Hi,
I got my base Kali Linux VMWare image from (https://help.offensive-security.com/...irtual-Machine) which is 2021.3 and I performed apt update and apt upgrade to install the latest packages.
I encountered this problem while interacting with reverse shells using Kali Linux. I think this is a usage problem, probably more related to bash or the terminal I am using.
My Kali Linux VM information is as follows:
Code:
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2022.2
Codename: kali-rolling
The typical way to upgrade a Python tty shell usually includes the following steps:
- python -c "import pty;pty.spawn('/bin/bash');"
- Ctrl + Z
- stty raw -echo; fg (my Kali Linux image is using zsh, so I read that I had to put "fg" on the same line)
- Enter
- Enter
- export TERM=xterm
- export SHELL=bash
- stty rows 32 cols 128
However, even with the steps, tab auto-complete and arrow keys still do not work. Pressing the arrow keys will display the escape characters (^[[A, etc). When I revert the Kali VMWare image to 2021.3, the steps work and I can use tab auto-complete and the arrow keys.
What has changed in Kali 2022.2 that now causes this change? How can I resolve this?