how to execute from the web

bernardino lopez bernardino_lopez@yahoo.com
Fri Feb 1 15:11:02 2002


Make apache run a another user that is able to
encrypt.

This should work =)

<?
putenv("/home/blopez/.gnupg ");

echo "<form enctype='multipart/form-data'
action='encrypt.php' method=post>";
echo "GPG Encryption:<BR> ";
echo "<textarea name='my_text' cols=60 ROWS=8> ";
echo "Enter Your Text ";
echo "</textarea> ";
echo "<input type=submit value='Encrypt'><br> ";

if (!isset($my_text)) { $my_text=" Text to be
Encrypted "; }


$a = "echo '$my_text' | /usr/bin/gpg -a --no-tty
--always-trust --batch --no-sec
mem-warning -e -u 'Bernardino Lopez
<bernardino_lopez@yahoo.com>' -r 'Bernardino Lo
pez <bernardino_lopez@yahoo.com>' --homedir
/home/blopez/.gnupg";

#echo "$a <br>";

echo exec($a,$e)."<br>";

while( $res=each($e) ) {
echo "$res[1]<BR>";
}

echo "</form> ";

?>



=)

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com