Web Shell 1.0.2 Manual


About
Web Shell allows you to execute the UNIX commands in a web browser remotely or locally. This software implements as a service with the inetd daemon, and the built-in HTTP server engine provides a web interface for the users to communicate with the system shell. There are two editions of the program included in the package, one is written in Perl and another one is written in Python, but they did the same thing. You can choose one that you like.


System Requirement
  • An UNIX-based operating system
  • inetd daemon
  • Perl 5.0/Python 2.0 or later installed



  • Installation & Configuration

    Step 1:
    First of all, choose an edition (Perl or Python) that you like. The file websh.pl is a perl script and the file websh.py is a python script. Move one of the script to /usr/local/bin. Then, check the permission of the file is correct or not, usually, should be 755 (rwxr-xr-x).

    Step 2:
    Change the password in the script file by editing the variable value in the script file (default is '123456'). The password should not contain space(s), symbol(s) or special character(s). You can also change the welcome command and the error command if you know what they are.

    Step 3:
    Add a service in the file /etc/services by append the following line to the file. This method does not work with Mac OS X, please
    read this document if you are using Mac OS X.

    websh    9000/tcp    #Web Shell

    This means the service called "websh" by using port 9000 with TCP protocol. You can change the values according to your needs.

    Step 4:
    Add the following line in the inetd daemon configuration file /etc/inetd.conf.

    websh  stream  tcp  nowait  nobody  /usr/local/bin/websh.py

    Change the last column to /usr/local/bin/websh.pl if you choose the perl edition.

    Step 5:
    The last step is to restart the inetd daemon. First, find the PID number of inetd by typing ps aux | grep "inetd" in the terminal. Then send a hangup signal to it by sudo kill -HUP 200, where 200 is the PID number, change this value according to your situation.

    Step 6:
    Now, you can test Web Shell by using a web browser, the browser can be graphical based (such as Netscape) or text based (such as Lynx). Enter http://127.0.0.1:9000 in the address bar if you used port 9000.


    Problems & Limitations
  • The password is transfer in plain text format, may have security problems.
  • The command to be executed should not require data input.



  • --- End of the manual ---