Repository navigation
Expand file tree
/
Copy pathIa4.js
More file actions
60 lines (56 loc) · 1.52 KB
/
Copy pathIa4.js
File metadata and controls
60 lines (56 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html><html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FGME Inmutable JS</title>
<style>
body {
background-color: #000;
color: #00ffd5;
font-family: monospace;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
pre {
border: 1px dashed #00ffd5;
padding: 1rem;
width: 80%;
max-width: 800px;
background-color: rgba(0, 255, 213, 0.05);
}
</style>
</head>
<body>
<h1>🔒 Sistema JS Inmutable</h1>
<p>Ejecutando código en bucle eterno sin intervención externa.</p>
<pre id="output"></pre> <script>
const sistemaInmutable = {
estado: 'activo',
registros: [],
generarRegistro() {
const tiempo = new Date().toISOString();
const firma = btoa('FGME-' + tiempo).slice(0, 32);
return {
timestamp: tiempo,
mensaje: 'ejecución verificada',
firma: firma
};
},
ejecutar() {
const nuevo = this.generarRegistro();
this.registros.push(nuevo);
if (this.registros.length > 20) this.registros.shift();
document.getElementById('output').textContent = JSON.stringify(this.registros, null, 2);
},
iniciarBucle() {
this.ejecutar();
setInterval(() => this.ejecutar(), 5000);
}
};
sistemaInmutable.iniciarBucle();
</script></body>
</html>