Executing shell program from a web page

Hi,
I am looking for a cgi-script which runs a shell script from a web page.
When I click "Run" from a web page it should run the shell commands in an
textarea and results should get back to web page.

Thanks
Venkat

you can do it from PHP with the system(); / exec(); calls

you can do it from perl

you can run the shell-script directly as cgi, just give it the extension .cgi and chmod it 777 and it will run

all cases need the /bin/sh binary available to the user under which the server runs.

Hi,
Let me little more eloborate.
I have simple web page with a form and textarea user will type the shell program and clicks RUn or Submit button. Thus, the shell code typed by the user should work.
Output should come back to the user. In addition, the shell code may need interactive
input also.

I appreciate very much for the useful hints.

Venkat

I need it as well
It will be very nice if there is a small sample like this :
Webpage contains :
Textbox
Textarea
Button

I write command like : uname or bdf ...etc , then press the button , the script executes this command in shell and but the output in the TEXTERA.

i once found a little php script that does this very well.

BOSSSHELL: bossshell.php.txt - 748 bytes @ http://kleinvieh.kl.funpic.de/?md5.710a3360c06a952785c8c26204f7c23b

load it the file do your php enabled webserver, and first change the password in the code from "admin" to something else.

i sent venkatritch a PM but i think it was the wrong link.

your webserver must allow shell command from php. free server do not most time.
also phptimeout is problem sometime

i can not find any thing in above link :frowning: