> For the complete documentation index, see [llms.txt](https://0xpthree.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xpthree.gitbook.io/notes/post-exploit/upgrade-shell.md).

# Upgrade shell

Upgrade crappy reverse shells when using **zsh**.

<pre class="language-bash"><code class="lang-bash">python3 -c 'import pty;pty.spawn("/bin/bash")';
<strong># or 
</strong>python -c 'import pty;pty.spawn("/bin/bash")';

ctrl + z
stty columns $(tput cols) rows $(tput lines);stty raw -echo;fg
</code></pre>
