[ back to toc ]

Accessing program from own browser

Date: 2002/04/18 15:30

Followup To Q:
Peter,
Thanks very much for your response. My follow up question: I want to
invite people to give me feedback on my Website. I first want to lead off
with about 5-6 questions which could have require a narrative response.
Example: "Was this site easy to navigate? If not, please explain the
problem." Are there any Bignosebird or other programs that would
accomplish this and that aren't too difficult to install?
P.S. As to my original question, what would I need to change in the script
that I have attached to be able not to get the "Sorry, cant run it from
here..." message?
Thanks for your help.
*NAME-DELETED*
##################################################################
sub valid_address
{
$testmail = $fields{$recipemail};
if ($testmail =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ||
$testmail !~
/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/)
{
return 0;
}
else
{
return 1;
}
}

sub valid_page
{
if (@okaydomains == 0) {return;}
$DOMAIN_OK=0;
$RF=$ENV{'HTTP_REFERER'};
$RF=~tr/A-Z/a-z/;
foreach $ts (@okaydomains)
{
if ($RF =~ /$ts/)
{ $DOMAIN_OK=1; }
}
if ( $DOMAIN_OK == 0)
{ print "Content-type: text/html\n\n Sorry, cant run it from
here....";
exit;
}
}

##################################################################
sub test_sendmail


Hi Peter,
The probram is birdcast.cgi Version 2.0 # updated May 2, 1999.
Everything works fine, except I keep getting this message "Sorry,can't run
it from here..." every time I try to run the program from my own IE6
browser. I can access it fine from my neighbors computer. The Website is
at http://www.unlockyourlife.com/ and the link "to let them know" is
located near the bottom ot the page. The program itself is located at
http://unlockyourlife.com/cgi-bin/recommend/birdcast.cgi
Any help you can provide will be greatly appreciated.
*NAME-DELETED*
A:
birdcast.cgi checks the referer included in the HTTP request starting the
script. This referer (it is misspelled to one r in the middle by will)
contains the URL of the page that contained the link to the next page or
the page that contained the form that led to the page of the script. To
avoid abuse of the script there is a global variable that checks the
referer and if this check fails the program writes out the message.

If this check was not there one malicious web master could set up an HTML
form which starts your script when the client submits the form, and could
contain false text in the form. That is the reason the check is there.

Read the code of the script, there are comments that will help you to see
where the referer is checked.

Regards,
Peter
Q:
A:
You have to insert somewhere in the start of the code

@okaydomains = (
"www.yourserver.com",
);

with 'yourserver' being your server and not the example string literally.

I think you can find some scripts on BNB, but I am not familiar with all
of those.

Regards,
Peter

[ back to toc ]