- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
-
-
『韦斯特』当年败光1600万美元的NBA巨星,沦落街头以乞讨为生,现在怎样了
-
-
东方网|日媒揽要9月11日:日本官房长官菅义伟称未来10年内没有必要增加消费税
-
甲型H1N1流感有什么症状? 甲型h1n1流感症状
-
昆明鹤立装修张思进开放式阳台居然这么漂亮!再不想要封闭阳台了!
-
-
-
-
-
现代快报|3个老汉性侵1名精神病患者,最小的都70岁了
-
-
电竞八卦赛后还直言不服,这个国服玩家有东西!,孤影SOLO竟吃了装备亏
-
上高速“5禁止”,有车没车都看看,尤其第3条,伤人无数
-
第一财经|首席对策|屈宏斌:政策信号明确 人民币升值速度转弱
-
国内最寂寞的火车站:一天只有一趟列车,网友:不如取消算了!
-
-
「昔昔财经」油价下调天然气价能否下调?应当考虑出租车行业的“复工复产”!
-