CINXE.COM

PoW Challenge

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PoW Challenge</title> <style> form { display: none; } body { background: #f5f5f5; margin: 0; padding: 0 } h1, h2, p, div { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } h1, h2 { color: #747474; } p { color: #778899; } div p { color: #000000; } .loader, .loader:before, .loader:after { border-radius: 50%; width: 2.5em; height: 2.5em; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation: load7 1.8s infinite ease-in-out; animation: load7 1.8s infinite ease-in-out; } .loader { color: #000000; font-size: 10px; margin: 2rem auto; position: relative; text-indent: -9999em; -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0); -webkit-animation-delay: -0.16s; animation-delay: -0.16s; } .loader:before, .loader:after { content: ''; position: absolute; top: 0; } .loader:before { left: -3.5em; -webkit-animation-delay: -0.32s; animation-delay: -0.32s; } .loader:after { left: 3.5em; } @-webkit-keyframes load7 { 0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em; } 40% { box-shadow: 0 2.5em 0 0; } } @keyframes load7 { 0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em; } 40% { box-shadow: 0 2.5em 0 0; } } </style> <script> async function sha256(message) { const msgBuffer = new TextEncoder().encode(message); const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer); const hashArray = Array.from(new Uint8Array(hashBuffer)); const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join(''); return hashHex; } async function generatePoW(challenge, difficulty) { let nonce = 0; let hash = ''; while (true) { hash = await sha256(challenge + nonce); if (hash.substring(0, difficulty) === '0'.repeat(difficulty)) { break; } nonce++; } return { nonce: nonce, hash: hash }; } document.addEventListener('DOMContentLoaded', async (event) => { const challenge = '685fee7216305cac837ec9e3eac81a6db54a6dada356eb0628a1a1c9000afb45'; const difficulty = 4; const challenge_timestamp = 1734062365; const result = await generatePoW(challenge, difficulty); fetch('/lima-cgi/validate_pow', { method: 'POST', body: 'nonce=' + result.nonce + '&hash=' + result.hash + '&challenge=' + challenge + '&challenge_timestamp=' + challenge_timestamp, }).then(response => { if (response.status === 400) { location.reload(); } else if (response.status === 200) { location.reload(); } }); }); </script> </head> <body> <div class="container" style="max-width: 800px; margin: 0 auto; text-align: center; padding: 0 20px;"> <h1>Checking your browser...</h1> <p>Please wait a few seconds.</p> <div class="loader"></div> <p class="request-id" style="font-size: 80%; margin-top: 60px; text-align: center; color: #747474;"> Request ID: gaLwg6KiyeJFZ6f5bj </p> </div> </body> </html>