Am trying to get my perl scripts to stay at 755, but every time I upload to the site the change to 644 status. I've had this site running without this problem for over a year now, therefore don't get why its suddenly started happening. Does this effect people using the shopping cart facility? haven't had any orders for a while so assume it does
It appears to only be the cp000001.pl and ts000001.pl scripts that are doing this. See cp000001.pl below. Any ideas
Jason
www.linefour.com
#!/usr/bin/perl
$Program = "CATTEST2";
$Version = '$Revision: 11 $ ';
$Version = substr($Version, 11);
$Version =~ s/ \$//;
$BAD = 0;
$GOOD = 1;
my ($bVersionState, $sMessage) =
CheckPerlVersion();
my $bCyberSitter = $GOOD;
my $nSum = unpack('%32C*', "sexy ");
if ($nSum != 914)
{
$bCyberSitter = $BAD;
$sMessage .= "It appears as if CyberSitter or some other network filter is mangling the CGI scripts.\r\n";
}
$Response = "20000" . $bVersionState . $bCyberSitter . (length $sMessage) .
" " . $sMessage;
$nLength = length($Response);
my $bNPH = 0;
if ( (defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/) ||
(defined($ENV{'GATEWAY_INTERFACE'}) && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl/))
{
$bNPH = 1;
}
my ($day, $month, $now, @now, $sNow);
my (@days) = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
my (@months) = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
$now = time;
@now = gmtime($now);
$day = $days[$now[6]];
$month = $months[$now[4]];
$sNow = sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT", $day, $now[3],
$month, $now[5]+1900, $now[2], $now[1], $now[0]);
binmode STDOUT;
if ($bNPH)
{
print "HTTP/1.0 200 OK\r\n";
}
print "Content-type: text/plain\r\n";
print "Content-length: $nLength\r\n";
print "Date: $sNow\r\n\r\n";
print $Response;
exit;
sub CheckPerlVersion
{
if ($] >= 5.002)
{
return ($GOOD, "");
}
else
{
return ($BAD, "The current Perl version is $].\r\n");
}
}
It appears to only be the cp000001.pl and ts000001.pl scripts that are doing this. See cp000001.pl below. Any ideas
Jason
www.linefour.com
#!/usr/bin/perl
$Program = "CATTEST2";
$Version = '$Revision: 11 $ ';
$Version = substr($Version, 11);
$Version =~ s/ \$//;
$BAD = 0;
$GOOD = 1;
my ($bVersionState, $sMessage) =
CheckPerlVersion();
my $bCyberSitter = $GOOD;
my $nSum = unpack('%32C*', "sexy ");
if ($nSum != 914)
{
$bCyberSitter = $BAD;
$sMessage .= "It appears as if CyberSitter or some other network filter is mangling the CGI scripts.\r\n";
}
$Response = "20000" . $bVersionState . $bCyberSitter . (length $sMessage) .
" " . $sMessage;
$nLength = length($Response);
my $bNPH = 0;
if ( (defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/) ||
(defined($ENV{'GATEWAY_INTERFACE'}) && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl/))
{
$bNPH = 1;
}
my ($day, $month, $now, @now, $sNow);
my (@days) = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
my (@months) = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
$now = time;
@now = gmtime($now);
$day = $days[$now[6]];
$month = $months[$now[4]];
$sNow = sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT", $day, $now[3],
$month, $now[5]+1900, $now[2], $now[1], $now[0]);
binmode STDOUT;
if ($bNPH)
{
print "HTTP/1.0 200 OK\r\n";
}
print "Content-type: text/plain\r\n";
print "Content-length: $nLength\r\n";
print "Date: $sNow\r\n\r\n";
print $Response;
exit;
sub CheckPerlVersion
{
if ($] >= 5.002)
{
return ($GOOD, "");
}
else
{
return ($BAD, "The current Perl version is $].\r\n");
}
}
Comment