- 主页 > 生活百科 > >
通过浏览器打开页面时执行js脚本 改变浏览器“指纹”( 二 )
var noisify = function (canvas, context) { if (context) { const shift = { 'r': Math.floor(Math.random() * 10) - 5, 'g': Math.floor(Math.random() * 10) - 5, 'b': Math.floor(Math.random() * 10) - 5, 'a': Math.floor(Math.random() * 10) - 5 const width = canvas.width; const height = canvas.height; if (width && height) { const imageData = https://www.isolves.com/it/cxkf/yy/js/2022-09-21/getImageData.Apply(context, [0, 0, width, height]); for (let i = 0; i < height; i++) { for (let j = 0; j < width; j++) { const n = ((i * (width * 4)) + (j * 4)); imageData.data[n + 0] = imageData.data[n + 0] + shift.r; imageData.data[n + 1] = imageData.data[n + 1] + shift.g; imageData.data[n + 2] = imageData.data[n + 2] + shift.b; imageData.data[n + 3] = imageData.data[n + 3] + shift.a; window.top.postMessage("canvas-fingerprint-defender-alert", '*'); context.putImageData(imageData, 0, 0); Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", { "value": function () { noisify(this, this.getContext("2d")); return toBlob.apply(this, arguments); Object.defineProperty(HTMLCanvasElement.prototype, "toDataURL", { "value": function () { noisify(this, this.getContext("2d")); return toDataURL.apply(this, arguments); Object.defineProperty(CanvasRenderingContext2D.prototype, "getImageData", { "value": function () { noisify(this.canvas, this); return getImageData.apply(this, arguments); document.documentElement.dataset.cbscriptallow = true; inject();【通过浏览器打开页面时执行js脚本 改变浏览器“指纹”】
推荐阅读
-
-
-
-
尤文图斯|说啥也得看!尤文公布联赛大名单,C罗强势回归,皮尔洛有底气了
-
v5战队|V5打野成代练乱杀TES,解说直言滔搏下路成提款机!笑笑看懵了
-
综艺节目▲国内的综艺节目到底有多假?看这些细节就清楚了
-
上观|上海首个4K超高清频道开播 在家享受影院级视听
-
台海头条|黄健庭被提名“监察院副院长”是陷阱?朱家军议员曝绿营2大目的
-
老王技能厂|Vloger的福音!西部数据推出全新闪迪移动存储解决方案
-
-
「云南酷车」竞争捷途X95?,东南旗舰SUV——DX9年内上市
-
下身再搭配|这位57岁的时尚博主, 身高仅152cm, 时髦的日常穿搭让人忽略身高
-
懂球之帝|巴黎准备满足米兰5000万欧元要价,足球市场:买特奥
-
「Aggro电竞」这水平碾压周淑怡,LPL最强女解说诞生?深夜发千字复盘
-
侯某|网曝某公司已婚女高管与男下属有染:被公婆在婚房内当场撞破
-
-
时尚荟集V|说肖战是理想男友穿搭典范,没人不服吧?
-
-
大国那些事儿|这一变化令军迷振奋,专家:完全出乎意料,海军版直20新图曝光
-
我国|国家外汇管理局:前三季度我国经常账户顺差1707亿美元