Spawn BASH

Spawn Bash shell with Python

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

If nothing happens

Run

which python

To check that python is installed

If still nothing, try python 3

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

In Perl

perl -e '`/bin/bash`'

In Ruby

ruby -e 'require "irb" ; IRB.start(__FILE__)'

Once you have the REPL running, you should be able to run commands by using `[COMMAND]` (for example `uname` to run uname).

In Node

node -e 'var exec = require("child_process").exec; exec("cat ~/key.txt", function (error, stdOut, stdErr) { console.log(stdOut); });'

To get autocomplete and more…

<control+z>

stty size

stty raw -echo

fg

reset Terminal type? screen

export TERM=screen

Allows you to clear screen

Host a file on your web server with python

python3 -m http.server 80

Last updated