snkrs-web端分析canvas中的fingerpint

39次阅读

共计 570 个字符,预计需要花费 2 分钟才能阅读完成。

snkrs web 端分析,canvas 中的 fingerpint

代码如下

(()=>{const canvas = document.createElement("canvas");
canvas.width = 280;
canvas.height = 60;
canvas.style.display = "none"
const context = canvas.getContext("2d");
context.fillStyle = "rgb(102, 204, 0)";
context.fillRect(100, 5, 80, 50);
context.fillStyle = "#f60";
context.font = "16pt Arial";
context.fillText("<@nv45. F1n63r,Pr1n71n6!", 10, 40);
context.strokeStyle = "rgb(120, 186, 176)";
context.arc(80, 10, 20, 0, Math.PI, !1);
context.stroke();
const canvasValue = canvas.toDataURL();
console.log(canvasValue)
})();

如何 mock 出 canvs 中的 fingerpint

contact me

博客: https://github.com/zhaojunlike

正文完
 0