#!/bin/sh #NAME: Web-Shell #DESCRIPTION: Execute a shell command via the web interface. HOME="../plugin.cgi" . /webs/cgi-bin/login.cgi if [ "$action" = "3" ]; then cmd=`echo $cmd|sed -e 's/+/ /g'|sed -e 's/%/\\\x/g'|sed -e 's/[\]x0[dD][\]x0[aA]//g'` cmd_html=`echo -e $cmd " "|sed -e 's/\"/\"/g'` fi cat << EOF_HTML Content-type: text/html Connection: close
Plugins / Web-Shell
Web-Shell
EOF_HTML if [ "$action" = "3" ]; then echo '
'
  echo -e "Web-Shell> " $cmd 
  eval `echo -e $cmd 2>&1` 
  echo '
' fi cat << EOF_HTML
Command:
Back <<
Run <<

Web-Shell

Execute a shell command.

Web-Shell

Command

Enter the command to execute.

EOF_HTML a=0