- 主页 > 生活百科 > >
通过浏览器打开页面时执行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罗 短短10天完成上位,官方:皮尔洛出任尤文图斯主教练
-
天窗|闪“曜夜”色,玩转街头,这才是独“1”无二的潮流型格
-
「便宜」比RX5还便宜的德系SUV,颜值帅过斯柯达,还完美避开双离合
-
大楼|斥资1万亿美元!沙特将建世界最大楼:可住500万人、长120公里
-
不爱尖叫的鸡|风靡日韩的美国“三指禅”保温杯,单手一秒开盖,网友:抵制不买
-
-
-
-
美国航空航天局|汤加火山羽流有多猛?NASA:创最高纪录 离地58公里
-
青年|后期最强的法师,无视婉儿大招,貂蝉秀不动,妹子玩家最喜欢
-
联合国大会|特朗普:如果情况允许,或将亲自出席9月的联合国大会
-
为什么遭到磕碰后,皮肤上会出现淤青 磕碰后皮肤为什么出现乌青块
-
-
达索系统与埃顿集团合作开发智能互联医院“交钥匙”工程解决方案,助力疫情防控工作
-