Upgrade dummy terminal to tty

April 20, 2020

If you have ever gotten a webshell and wanted an interactive terminal this post is for you!.

With Python

python -c 'import pty;pty.spawn("/bin/bash")'

Without Python

script -qc /bin/bash /dev/null
(inside the nc session) CTRL+Z;stty raw -echo; fg; ls;
export TERM=xterm-256color
export SHELL=bash