#!/bin/sh fbdata="/u/faculty/dick/fb.dat" # path name of file writable by 'nobody' export fbdata spoof=dick errorsto=$spoof@csci.csusb.edu export errorsto echo Content-type: text/plain echo if [ x"$REQUEST_METHOD" = xPOST ] then /u/faculty/dick/bin/unpost $CONTENT_LENGTH | /u/faculty/dick/bin/url2lf | /u/faculty/dick/bin/urlunencode | ( # start posted data read l1; export l1 key=`expr "$l1" : 'key=\([0-9]*\)'` comment=`expr "$l1" : "key=$key&comment=\(.*\)"` if [ x"$key" = x ] then echo Incorrect form for this action echo Debugging Information: key=\""$key"\", comment=\""$comment"\". echo The following data is ignored. echo "$l1" cat exit fi command=`sed <$fbdata -n "/^$key /s///p"` if [ x"$command" = x ] then echo Debugging Information: key="$key", comment="$comment" echo Form not on file, so the following data is ignored. echo "$l1" cat exit fi (echo "$comment"; cat) | eval $command && echo $command sent your feedback OK. echo Thank you for your time and thought providing it. ) else echo REQUEST_METHOD should be post fi