pwny.cc
Search…
Misc

Python shell beautifier

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

Upgrade Full TTY - PTY Module

1
$ python -c 'import pty; pty.spawn("/bin/bash")'
2
[email protected]:$ ^Z #(background)
3
4
[email protected]:$ stty -a | head -n1 | cut -d ';' -f 2-3 | cut -b2- | sed 's/; /\n/' #(get ROWS and COLS)
5
[email protected]:$ stty raw -echo; fg
6
8
[email protected]:$ stty rows ${ROWS} cols ${COLS}
9
[email protected]:$ export TERM=xterm #(or xterm-color or xterm-256color)
Copied!