CGI-Telnet
Overview
CGI-Telnet is a CGI script that allows you to execute commands on your web
server. It is a useful tool if you don't have telnet access to your server.
- Ease of use - CGI-Telnet has a user interface
similar to a standard telnet client and is therefore very easy to use. It
provides command prompts similar to the operating system that it is running
on.
- Compatibility - CGI-Telnet works on Unix
and Windows NT. It has been tested on Windows NT 4.0 running IIS, Linux
and Solaris running Apache. It is compatible with all browsers. It has been
tested using Microsoft Internet Explorer (Windows), Netscape (Windows),
Netscape (Linux) and Lynx (Linux).
- File Transfers - You can upload and download
files from your server. All files on the server can be downloaded as long
as you have read permissions on them. These include files that are normally
not even visible to a FTP Client...like /etc/passwd/;-)
- Minimal Configuration - The only configuration
change that you need to make is to change the password. If you running the
script on Windows NT, you'll need to make one more change to the script.
See the Installation Section for more details.
- Command Timeouts - CGI-Telnet automatically
times out all commands after a specified duration. This is useful, for programs
that hang or take very long to execute like "find /". The timeout period
can be changed or you can turn this option off. See the installation section
for more details. The timeout period doesn't work if you're running the
script on Windows NT.
- Real-Time Output - Output is displayed
as it is generated, so you don't have to wait for a command to complete
to see the result. This is useful for commands like ping, tracert, traceroute,
find, etc.
- Change Directory - Directory information
is maintained internally, so you don't need to change the directory each
time you run a command.
- Security - A password is required to login.
After you disconnect, you need to login to run commands again. Even if a
page has been cached by your browser, you'll need to re-login before running
commands. Closing the browser also logs you out.
You need to have CGI support and a Perl interpreter on your system. This
script has been tested using Version 4 or Perl. However, Version 5 is highly
recommended.
- Interactive Commands - CGI-Telnet cannot
run interactive commands. If you try to execute an interactive command,
it will timeout
- Changing Drives (Windows NT Only) - If
you're running the script under Windows NT, you cannot change the drive.
You can however, run commands, list directories, read, upload and download
files from other drives. You need to give the complete path in this case.
This will be fixed in the next release.
Perform the following steps to install the script.
- Extract the script file cgitelnet.pl from
the archive.
- Modify the first line of the script to point to the correct path of
perl on your server. The default #!/usr/bin/perl
should work fine on most servers. If you're running the script on Windows
NT, you may not need to modify this.
- Change the password in the User Configuration section
$Password = "changeme";
If you are running the script under Windows NT, change $WinNT to 1
$WinNT = 1;
- Upload the script to your server. Make sure that you upload the script
in ASCII mode and the directory in which you upload the script has permissions
to execute CGI scripts. This directory is usually cgi-bin.
- Change the Permission (CHMOD) of the script to 755.
Installation is now complete. Point your favorite browser to the script URL.
If you uploaded the script to cgi-bin, the URL will
probably be http://www.yourserver.com/cgi-bin/cgitelnet.pl
Enter your password to login.