#!/usr/bin/perl # By Artem Litvinovich (al867@columbia.edu) # Feb 15, 2003 use CGI qw(:standard); # TARGET DIRECTORY (must have write permission) my $targetdir = "/tmp"; # VALID CALLER URL (beginning) my $validorigin = "http://localhost"; my $q = CGI->new(); my $notify = $q->param("notify"); if(referer() =~ /^\Q$validorigin\E/) { `echo $notify | cat > $targetdir/.forward` if($notify); print header,start_html(),"Forwarding to: <b>".(`cat $targetdir/.f +orward`)."</b>",end_html(); } else { print header,start_html(),"invalid origin",end_html(); } exit 1;
<html><body> <form action="setnotify.cgi" method="get"> Update notification email address: [<i>leave blank to view current set +ting</i>]<br><br> <input type="text" name="notify" size="48" maxlength="250"> <inpu +t type="submit" value="View/Update"> </form> </body></html>
In reply to remote .forward setter by ArtemZ1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |