Upgrade dummy terminal to tty

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.