wash - Webbrowser Accessible SHell
wash is a little Python script (running entirely on the host) enabling shell access through any browser. Pleas read What it is not and Warnings before downloading and installing the script.
How could this be usefull?
This script could be usefull if you want to install or backup something on a web server with only ftp access. My cheap web hoster is allowing me to run only one process for a short time. So it is not possible to run something like Ajaxterm. See also the third point of What it is not. I programmed this script to untar/tar and ungzip/gzip files on the web server. This saves much time, because transfering thousands of little files via ftp takes much more time than transfering one big file. But you can do more with it, depending on the commands the host is allowing you to use. On the server I tested, the script gives me full shell access and I am able to do many things with the files in my user directories. It even gives me the possibility to build C programs on the host.
What it is not
It is no interactive Terminal emulator like Ajaxterm. Interactive programs like man or vi will not work, though you can set one stdin value wich will work with some programs asking one question.
- It is not secure. All commands (and passwords) you are sending with this script to the host are send unencrypted over the internet (you could use ssl but then there is a big chance that the host is also enabeling ssh access).
It is not save nor perfect. Most cheap web hosters are allowing only a few seconds for every process to run. If the program you are executing takes longer than this, it will crash and depending on the host, it will stay in memory and block any new process. In this case you should be able to set a command like ps -a -Uusername and run a os.spawnl(os.P_WAIT,"/bin/kill","9","52342") python command to kill the stuck process with id 52342.
Warnings
- Using this could be illegal (depending on the terms of use of you web server, the country you are living in and the things you are doing with it).
Using this could destroy all data on the host or render it useless! You should use this only if you know what you are doing.
- I will not assume any responsability for what you are doing with this. There is also no warranty that this script is doing what it should do.
Installation
- untar.gz the downloaded archive.
- copy wash.py to a directory with permissions to execute python cgi (rename wash.py to wash.cgi as needed).
copy the templates directory somewhere the script has read access.
copy the variables directory somewhere the script has read and write access.
- edit the Configuration section in the wash.py file as needed (read the comments there).
Templates
The *.tmpl files in the templates directory are html files with python string format informations (named format tags like %(title)s or %(script_url)s etc). You can change them or point to another template directory or other template names with the Configuration variables in the wash.py file. If you have created a cool css, please send it to me.
Screenshots
compact mode
advanced mode