KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/sjsachs/cgi-bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/sjsachs/cgi-bin/guestbk.cgi
#!/usr/bin/perl 

$mailprog = '/usr/sbin/sendmail';
$recipient = '[email protected]';
$subject='Message from sachsfurniture.com';
$from='[email protected]';

print "Content-type: text/html\n\n";

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});


@pairs = split(/&/, $buffer);


foreach $pair (@pairs)
{
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;


    if ($name eq "resulturl") {$returnurl = $value;}
    if ($name eq "subject") {$subject=$value;}
    if ($name eq "from") {$from=$value;}
    if ($name eq "email_or_phone") {$email_status=$value;}


}

open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "---------------------------------------------------------------------------\n";
print MAIL "\n";
foreach $pair (@pairs)
{
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    print  MAIL "$name : $value\n";
}

print MAIL "---------------------------------------------------------------------------\n";
close (MAIL);

if ($email_status eq "email") 
{
open (MAIL, "|$mailprog $from") || die "Can't open $mailprog!\n";
print MAIL "Subject: $subject\n";
print MAIL "From: rechtman\@aol.com\n";
print MAIL "This is a confirmation receipt of your form\n\nThank you.\n";
print MAIL "Please visit http://www.sachsfurniture.com for more information.\n\n";
print MAIL "---------------------------------------------------------------------------\n";
print MAIL "You submitted the following information:\n";
foreach $pair (@pairs)
{
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    print  MAIL "$name : $value\n";
}

print MAIL "---------------------------------------------------------------------------\n";
close (MAIL);

}

print "<html><head><META HTTP-EQUIV=\"refresh\" CONTENT=\"1; URL=$returnurl\">\n</META>";
print "<Title>\nRechtman.COM - Thank you</Title></Head>\n";
print "<Body>\n<H2>Thank you for signing the Guest Book ... </H2>\n</Body>";

print "<HR><P>\n";
print "<big>\nThis page will be automatically redirected...<br>Otherwise, please click here to\n <A HREF=\"$returnurl\">return To Calling Page...</a>\n</big>\n";

$now_day = (localtime(time()))[3];
$now_mon = (localtime(time()))[4]+1;
$now_year = (localtime(time()))[5] + 1900;
print "<p align=\"right\">Sent on: $now_mon-$now_day-$now_year\n";

exit;

Anon7 - 2021