-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVIRTUALDIS.htm
More file actions
21 lines (18 loc) · 5.23 KB
/
Copy pathVIRTUALDIS.htm
File metadata and controls
21 lines (18 loc) · 5.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!-- saved from url=(0029)http://8.8.8.8/virtualdisplay -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var scrollpos = localStorage.getItem('scrollpos');
if (scrollpos) window.scrollTo(0, scrollpos);
});
window.onbeforeunload = function(e) {
localStorage.setItem('scrollpos', window.scrollY);
};
</script>
<script>
window.onload = function() {
document.getElementById('overlay').style.display = 'none';
};
</script>
<link rel="stylesheet" href="NETHERCAP.css">
<link rel="preconnect" href="https://fonts.googleapis.com/" crossorigin="use-credentials"><link rel="preconnect" href="https://fonts.gstatic.com/"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Mulish:wght@200;300;400;500;600;700;800;900&display=swa"><style>undefined</style></head><body><div class="content anim-slide-up"><div class="glow-title">VIRTUAL DISPLAY</div><div class="button-grid"><form method="post" action="http://8.8.8.8/"><button>BACK</button></form></div><div style="text-align: center; margin-top: 20px;"><canvas id="lockCanvas" width="128" height="64" style="width: 100%; max-width: 512px; image-rendering: pixelated; border: 2px solid rgb(14, 92, 194); background: rgb(0, 0, 0);"></canvas><div style="margin-top: 10px; color: var(--accent-cyan);">FPS: <span id="fps-counter">22.0</span> | Latency: <span id="latency-display">41.8</span>ms</div></div><div class="section-title">Controls</div><div class="button-grid" style="grid-template-columns: repeat(3, 1fr); max-width: 300px; margin: 0 auto;"><div style="grid-column: 2;"><button id="btn-up" onclick="sendButtonCommand('1')">▲</button></div><div style="grid-column: 1; grid-row: 2;"><button id="btn-left" onclick="sendButtonCommand('4')">◀</button></div><div style="grid-column: 3; grid-row: 2;"><button id="btn-right" onclick="sendButtonCommand('2')">►</button></div><div style="grid-column: 2; grid-row: 3;"><button id="btn-down" onclick="sendButtonCommand('3')">▼</button></div></div><div class="section-title">Notice</div><div class="info-section"><p style="color: var(--accent-danger);">* Activating sniffer-based features will make you disconnected</p><p>** Activating deauth/beacon spam will throttle streaming performance</p></div><div hidden="" id="log" class="log-container" style="height: 150px; margin-top: 20px;"><p class="log-entry info">[6:42:04 AM] Connected to stream</p></div><script>const logContainer = document.getElementById('log');const canvas = document.getElementById('lockCanvas'); const ctx = canvas.getContext('2d');const fpsCounter = document.getElementById('fps-counter');const latencyDisplay = document.getElementById('latency-display');const imgData = ctx.createImageData(128, 64);let ws; let frameCount = 0;let lastFpsUpdateTime = performance.now();let lastFrameTime = performance.now();let latencies = [];function logMessage(message, className = '') { const p = document.createElement('p'); p.className = 'log-entry ' + className; p.textContent = `[${new Date().toLocaleTimeString()}] ${message}`; logContainer.appendChild(p); logContainer.scrollTop = logContainer.scrollHeight;}function initWebSocket() { ws = new WebSocket(`ws://${window.location.hostname}:8080`); ws.binaryType = 'arraybuffer'; ws.onopen = () => { canvas.style.borderColor = '#0e5cc2'; logMessage('Connected to stream', 'info'); sendCommand('0'); }; ws.onmessage = (event) => { if (event.data instanceof ArrayBuffer) { const now = performance.now(); latencies.push(now - lastFrameTime); if (latencies.length > 10) latencies.shift(); lastFrameTime = now; frameCount++; const buffer = new Uint8Array(event.data); if (buffer.length === 1024) drawBufferFast(buffer); } }; ws.onclose = () => { canvas.style.borderColor = '#ff6b6b'; setTimeout(initWebSocket, 2000); }; ws.onerror = () => { canvas.style.borderColor = '#ff6b6b'; };}function sendCommand(payload) { if (ws && ws.readyState === WebSocket.OPEN) { ws.send(payload); } }function sendButtonCommand(command) { sendCommand(command); logMessage(`Sent command: ${command}`, 'info'); }function drawBufferFast(buffer) { const data = imgData.data; for (let i = 0; i < buffer.length; i++) { const x = i % 128; const page = Math.floor(i / 128); const byte = buffer[i]; for (let bit = 0; bit < 8; bit++) { const pixelIndex = ((page * 8 + bit) * 128 + x) * 4; const color = ((byte >> bit) & 1) ? 255 : 0; data[pixelIndex] = color; data[pixelIndex + 1] = color; data[pixelIndex + 2] = color; data[pixelIndex + 3] = 255; } } ctx.putImageData(imgData, 0, 0);}setInterval(() => { const now = performance.now(); const delta = (now - lastFpsUpdateTime) / 1000; fpsCounter.textContent = (frameCount / delta).toFixed(1); let avgLatency = 0; if (latencies.length > 0) { avgLatency = latencies.reduce((a, b) => a + b, 0) / latencies.length; } latencyDisplay.textContent = avgLatency.toFixed(1); frameCount = 0; lastFpsUpdateTime = now;}, 1000);setInterval(() => { if (ws && ws.readyState === WebSocket.OPEN) { ws.send('0'); }}, 10000);initWebSocket();</script></div></body></html>