Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
// Define Host Info || Who is sending emails?
define("HOST_NAME", "Sitio web Caballos Criollos");
define("HOST_EMAIL", "sitioweb@caballoscriollos.com");
// Define SMTP Credentials || Gmail Informations
define("SMTP_EMAIL", "sitioweb@caballoscriollos.com");
define("SMTP_PASSWORD", "$Martin10"); // read documentations
// Define Recipent Info || Who will get this email?
define("RECIPIENT_NAME", "Caballos Criollos");
define("RECIPIENT_EMAIL", "info@caballoscriollos.com");
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\SMTP;
require './PHPMailer/src/Exception.php';
require './PHPMailer/src/PHPMailer.php';
require './PHPMailer/src/SMTP.php';
require '../../library/class.contacto.php';
require '../../library/class.contactos.php';
if(isset($_POST['g-recaptcha-response'])) {
$captcha=$_POST['g-recaptcha-response'];
}
if(!$captcha){
echo "<div class='alert alert-danger'><p class='error'>El mensaje no pudo ser enviado. Por favor, intente nuevamente.</p></div><!-- /.inner -->";
exit;
}
$response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Ldn1yApAAAAAClMCAaGxYbdHxYCpYhDUN9vyn-Q&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true);
if($response['success'] == false)
{
echo "<div class='alert alert-danger'><p class='error'>El mensaje no pudo ser enviado. Por favor, intente nuevamente.</p></div><!-- /.inner -->";
exit;
}
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
$oContactos = new Contactos();
try {
//Server settings
$mail->SMTPDebug = 0; //Enable verbose debug output
// $mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through
// $mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = SMTP_EMAIL; //SMTP username
$mail->Password = SMTP_PASSWORD; //SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable implicit TLS encryption
$mail->Port = 587; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
//Recipients
$mail->setFrom(HOST_EMAIL, HOST_NAME);
$mail->addAddress(RECIPIENT_EMAIL, RECIPIENT_NAME); //Add a recipient
//Content
$destined = isset($_POST['destined']) ? preg_replace("/[^\.\-\' a-zA-Z0-9]/", "", $_POST['destined']) : "";
$name = isset($_POST['name']) ? preg_replace("/[^\.\-\' a-zA-Z0-9]/", "", $_POST['name']) : "";
$senderEmail = isset($_POST['email']) ? preg_replace("/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['email']) : "";
$phone = isset($_POST['phone']) ? preg_replace("/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['phone']) : "";
$message = isset($_POST['message']) ? preg_replace("/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message']) : "";
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = 'Ha recibido un nuevo contacto: ';
$mail->Body = 'Destino: ' . $destined . "<br>";
$mail->Body .= 'Nombre y apellido: ' . $name . "<br>";
$mail->Body .= 'Email: ' . $senderEmail . "<br>";
$mail->Body .= 'Teléfono: ' . $phone . "<br>";
$mail->Body .= 'Consulta: ' . $message . "<br>";
$oContacto = new Contacto();
$oContacto->Fecha = date('Y-m-d H:i:s');
$oContacto->Destino = $destined;
$oContacto->Nombre = $name;
$oContacto->Email = $senderEmail;
$oContacto->Telefono = $phone;
$oContacto->Consulta = $message;
$oContactos->Create($oContacto);
$mail->send();
echo "<div class='alert alert-success'><p class='success'>Muchas gracias por contactarnos. Le responderemos a la brevedad posible!</p></div><!-- /.inner -->";
} catch (Exception $e) {
echo "<div class='alert alert-danger'><p class='error'>El mensaje no pudo ser enviado. Por favor, intente nuevamente.</p></div><!-- /.inner -->";
}
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat