Python
SHELL=/bin/bash script -q /dev/null
python3 -c 'import pty; pty.spawn("/bin/bash")'
# CTRL + Z (we put the shell in background, use #fg to put it in foreground)
kali# stty raw -echo && fg
SHELL=/bin/bash script -q /dev/null
python3 -c 'import pty; pty.spawn("/bin/bash")'
# CTRL + Z (we put the shell in background, use #fg to put it in foreground)
kali# stty raw -echo && fg