Checking your browser

Running security check...
function setStatus(text) { var el = document.getElementById("status"); if (el) { el.textContent = text; } } function setDetail(text) { var el = document.getElementById("detail"); if (el) { el.textContent = text; } } function pickReturnUrl() { var params = new URLSearchParams(window.location.search); var url = params.get("url"); if (url && url.startsWith("/") && !url.startsWith("//")) { return url; } return "/"; } function leadingZeroBits(bytes) { var count = 0; for (var i = 0; i < bytes.length; i++) { var value = bytes[i]; if (value === 0) { count += 8; continue; } for (var bit = 7; bit >= 0; bit--) { if ((value >> bit) & 1) { return count; } count += 1; } } return count; } function sha256Bytes(text) { var encoder = new TextEncoder(); return crypto.subtle.digest("SHA-256", encoder.encode(text)).then(function (hash) { return new Uint8Array(hash); }); } function solvePow(nonce, ua, difficulty) { if (!difficulty || difficulty <= 0) { return Promise.resolve(0); } var counter = 0; var loop = function () { return sha256Bytes(nonce + "|" + ua + "|" + counter).then(function (hash) { if (leadingZeroBits(hash) >= difficulty) { return counter; } counter += 1; if (counter % 200 === 0) { return new Promise(function (resolve) { setTimeout(resolve, 0); }).then(loop); } return loop(); }); }; return loop(); } function runChallenge(config) { if (!window.crypto || !window.crypto.subtle) { setStatus("Browser crypto unavailable"); return; } setStatus("Generating browser proof..."); var ua = navigator.userAgent || ""; var lang = navigator.language || ""; var tz = ""; try { tz = Intl.DateTimeFormat().resolvedOptions().timeZone || ""; } catch (e) { tz = ""; } var screenSize = ""; if (window.screen) { screenSize = window.screen.width + "x" + window.screen.height; } var webdriver = navigator.webdriver === true; var started = performance.now(); solvePow(config.nonce, ua, config.difficulty || 0) .then(function (counter) { var elapsed = Math.round(performance.now() - started); if (config.minElapsedMs && elapsed < config.minElapsedMs) { return new Promise(function (resolve) { setTimeout(resolve, config.minElapsedMs - elapsed); }).then(function () { return { counter: counter, elapsed: Math.round(performance.now() - started) }; }); } return { counter: counter, elapsed: elapsed }; }) .then(function (result) { var body = { nonce: config.nonce, ts: config.ts, sig: config.sig, counter: result.counter, elapsed_ms: result.elapsed, fingerprint: { ua: ua, lang: lang, tz: tz, screen: screenSize, webdriver: webdriver, }, }; return fetch(window.location.pathname, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(body), }); }) .then(function (response) { if (response.status === 204) { window.location.href = pickReturnUrl(); return; } setStatus("Challenge failed"); setDetail("Please reload the page."); }) .catch(function () { setStatus("Challenge error"); setDetail("Please reload the page."); }); }