- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
学历史的人的气质|学历史的人的气质 学历史的人是不是都很有儒雅的气质
-
-
『健身』他是爱撸猫的肌肉男,短短几年就练得这么好了!
-
蒲公英花的功效与作用及食用方法,苹果花的功效与作用
-
-
-
新浪|新浪天津就改标题致歉:当事编辑擅自改修改 已停职
-
海警船@两大国在南海大打出手,争夺石油不择手段,4000吨海警船直接冲撞
-
谋女郎|静候官方回应,“谋女郎”刘浩存妈妈培训班被曝致10岁学员瘫痪
-
-
-
-
吴拿话农事■希望没有你!,“停工令”再升级!有10大行业或复工无望
-
南京社区教育| 南京栖霞社区关爱残疾失能老人,防汛期间
-
委内瑞拉|闻名的“美女王国”:石油货币都不缺,为何女性却不敢生育?
-
林书豪|福建被钉耻辱柱!一节缴枪投降,半场28分,这水平怎么赢的广厦
-
-
梦幻西游|梦幻西游:史上最贵空号!无装备32万被瞬秒,号主为此还等了1年
-
-