Interactive Shell
Python
python -c 'import pty; pty.spawn("/bin/bash")'
python3 -c 'import pty; pty.spawn("/bin/bash")'
Bash
echo os.system('/bin/bash')
script /dev/null -c bash
Sh
/bin/bash -i
Perl
perl -e 'exec "/bin/bash"'
Ruby
exec "/bin/bash"
Lua
os.execute('/bin/bash')
Adjust Interactive shell
script /dev/null -c bash
[Ctrl Z]
stty raw -echo; fg
reset xterm
exportTERM=xterm
exportSHELL=bash
Then in other terminal in our machine we type:
stty -a
Then we copy the numer of rows and columns and in the shell we type:
stty rows {number} columns {number}
rlwrap
Ex: rlwrap nc -nlvp 443
Last updated