gloomytrousers.co.uk

cgishell

Hey, maybe you're looking for the other CGIShell - a wrapper for running arbitrary Windows programs as CGI scripts. I really must rename this. Anyway...

Screenshot of cgishell in use This cgishell simulates a command-line interface over HTTP, in your web browser. Use it on a server where you have CGI access (and Perl installed) but wouldn't otherwise have shell access (e.g. a commercial web host1), or if some draconian firewall prevents you from using ssh/telnet.

Allows you to do more or less anything on the system that you could do in a CGI script, without the bother of uploading and executing a script each time you want to do something that you can't do any other way. Since this is obviously not something you want the general public to be able to do on your server, it'll only run if AUTH_USER is set - i.e. if the user has authenticated with the server. You can force the user to authenticate and restrict access to certain users with .htaccess (instructions) or equivalent, or ask your hosting administrator to set it up.

Since I'm trying to simulate state over a stateless protocol, don't expect to be able to do vastly complicated things - stuff like set won't (yet) work like it would if you were logged directly, and forget about anything interactive (i.e. any program that stops and waits for user input, such as more/less, passwd, text editors, etc.) - it'll just hang until the server times out and kills the process!

Important: This is the first version; consider it beta-quality only. It may or may not delete all your files (or allow someone else to do the same), give up root access at the drop of a hat, or crack the Pentagon and start World War 3. This version isn't great under Apache (I didn't have access to an Apache server when I was first writing it), but it works on M$ IIS with no problems. Next version (whenif I get round to it) will work well under Apache too.

Browser support: Mostly tested in Mozilla, also works on Internet Explorer despite a bug with its implementation of .innerHTML (I've mostly worked around it, but tabs will display as spaces). It won't work in Netscape 4 or earlier (no <iframe> support). Whatever you use, you need JavaScript turned on, and good CSS support helps too.

cgishell.zip (v0.1a, 09 Sep 2002, 12.8KB)

1 Before you ask, it's not installed on this server. Don't bother looking.

Valid XHTML 1.0!
Valid CSS!
Non-humans only