xwiterm is a terminal emulator developed to run via browser which let's you execute shell commands and interact with input/output just like in a shell It was based in xterm (terminal emulator for X). Has the possibility to execute commands that needs user interaction, like "sudo su", because the emulator waits for the user input.
Just drop all the files in a folder of your webserver, change permissions of the commands file and enjoy it accessing via browser.