HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fingerprint Audit</title>
<style>
body { font-family: Arial, sans-serif; background:#f4f4f4; color:#333; padding:20px; }
h1 { text-align:center; }
.card { background:#fff; padding:15px; margin:10px 0; border-radius:10px; box-shadow:0 2px 5px rgba(0,0,0,0.1); }
.ok { color:green; font-weight:bold; }
.warn { color:orange; font-weight:bold; }
.fail { color:red; font-weight:bold; }
pre { background:#eee; padding:10px; border-radius:5px; overflow:auto; }
</style>
</head>
<body>
<h1>Browser Fingerprint Audit</h1>
<div id="results"></div>
<script>
function addResult(title, value, status="ok") {
const container = document.getElementById("results");
let div = document.createElement("div");
div.className = "card";
div.innerHTML = `<h3>${title}</h3><p class="${status}">${status.toUpperCase()}</p><pre>${value}</pre>`;
container.appendChild(div);
}
// 1. User Agent & Platform
addResult("User-Agent", navigator.userAgent, "ok");
addResult("Platform", navigator.platform, "ok");
if(navigator.userAgent.includes("Win") && !navigator.platform.includes("Win")) addResult("UA vs Platform", "Mismatch!", "fail");
// 2. WebGL GPU Info
(function(){
try {
const canvas = document.createElement("canvas");
const gl = canvas.getContext("webgl");
const debugInfo = gl.getExtension("WEBGL_debug_renderer_info");
const gpu = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
addResult("WebGL GPU", gpu, gpu.includes("SwiftShader")||gpu.includes("llvmpipe") ? "warn":"ok");
} catch(e){ addResult("WebGL GPU", "Not supported", "fail"); }
})();
// 3. Audio Fingerprint
(function(){
try {
const ctx = new (window.AudioContext || window.webkitAudioContext)();
const osc = ctx.createOscillator();
const comp = ctx.createDynamicsCompressor();
osc.connect(comp);
comp.connect(ctx.destination);
osc.start(0);
const buf = ctx.createBuffer(1, 44100, 44100);
const arr = buf.getChannelData(0);
let sum=0; for (let i=0;i<100;i++) sum+=arr[i];
addResult("Audio FP (sum sample)", sum, "ok");
} catch(e){ addResult("Audio FP", "Not supported", "fail"); }
})();
// 4. Canvas Fingerprint
(function(){
const c=document.createElement("canvas"); const ctx=c.getContext("2d");
ctx.textBaseline="top"; ctx.font="16px Arial"; ctx.fillText("audit123",2,2);
const hash = c.toDataURL().slice(0,50);
addResult("Canvas FP", hash, "ok");
})();
// 5. Fonts
addResult("Fonts", navigator.userAgent.includes("Win") ? "Expect Segoe UI, Arial" : "Check Mac fonts", "ok");
// 6. Timezone & Locale
addResult("Timezone", Intl.DateTimeFormat().resolvedOptions().timeZone, "ok");
addResult("Language", navigator.language + " / " + navigator.languages.join(", "), "ok");
// 7. Plugins
addResult("Plugins", navigator.plugins.length ? [...navigator.plugins].map(p=>p.name).join(", ") : "None", "ok");
// 8. Hardware
addResult("Cores", navigator.hardwareConcurrency || "Unknown", "ok");
addResult("Memory (GB)", navigator.deviceMemory || "Unknown", "ok");
</script>
</body>
</html>