 |
php
$send_to = 'your@email.com';
$user = 'user';
$password = 'password';
$subject = 'bug report';
$body = 'please find the bug report attached';
$from_email = 'sender@email.com';
$from_name = 'sender name';
require 'class.phpmailer.php';
$realm = 'madExcept upload script';
if (($user != '') && (($_SERVER['PHP_AUTH_USER'] != $user) || ($_SERVER['PHP_AUTH_PW'] != $password)))
= ('nonce'=>, 'nc'=>, 'cnonce'=>, 'qop'=>, 'username'=>, 'uri'=>, 'response'=>);
= ();
= ('|', ());
('@('..')=(?:([\'"])([^\]+?)\|([^\,]+))@', $_SERVER[''], $matches, PREG_SET_ORDER);'
( )
[[]] = [] ? [] : [];
([[]]);
$A1 = md5($user.':'.$realm.':'.$password);
$A2 = md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']);
$valid_response = md5($A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2);
if (($needed_parts) || ($data['username'] != $user) || ($data['response'] != $valid_response))
('WWW-Authenticate: Digest realm="'..'",qop="auth",nonce="'.().'",opaque="'.().'"');
('HTTP/1.1 401 Unauthorized');
;
}
$mailer = new PHPMailer();
$mailer->AddAddress($send_to);
$mailer->Subject = $subject;
$mailer->Body = $body;
$mailer->From = $from_email;
$mailer->FromName = $from_name;
$mailer->Mailer = 'mail';
if (isset($_POST['MailSubject']))
$mailer->Subject = $_POST['MailSubject'];
if (isset($_POST['MailBody']))
$mailer->Body = $_POST['MailBody'];
if (isset($_POST['MailFrom']))
= ['MailFrom'];
= (, '<');
= (, '>');
(!(( === ) || ( === ) || ( >= )))
-> = ((, , ));
->(((, + , - - )), ->);
else
->(());
}
$found = false;
foreach ($_FILES as $arr)
->(['tmp_name'], ['name']);
= ;
;
if ($found)
$mailer->AttachAll();
if (($found) || (isset($_POST['MailSubject'])) || (isset($_POST['MailBody'])))
(!->())
('HTTP/1.0 500 Mailing failed');
else
if ($_SERVER['REQUEST_METHOD'] != 'POST')
header('HTTP/1.0 500 Bad request method');
else
header('HTTP/1.0 500 No report received');
?>
|
|