- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
午间时刻|王者荣耀:猪八戒战令皮3D视角,腰封超霸气,变色龙很乖,尾巴看了想摸!
-
-
迈克尔·乔丹■单挑输球,被喷了句垃圾话就把队友交易走!乔丹真是惹不起
-
-
-
北京卫视|“对不起大家!”石景山万达女子自述为何破坏报警器外出
-
-
青年|盘点kpl上那些饱受争议的教练:estar和AG超玩会都没能躲得过去!
-
徽柔怀吉粉|本以为不合适,看到成品是我眼拙了,吉克隽逸长得黑还要穿吊带裙
-
-
该咋滴才可以发qq邮箱,怎么把文件发送到别人的邮箱里
-
舍里|一人内疚自杀,自己却无罪,英少年开宝马出车祸:一人当场死亡
-
郭梓宁|现场|中国奥园:今年拿地预算350亿至400亿元
-
农历|古人说“闰四月,两头春;老农民,卖儿孙”,到底是啥意思
-
台海网■武汉解封!民进党还有什么理由限制台胞回台?陆委会又“打太极”
-
-
DM科技|折叠屏设计大改,不再是好评众多,三星设计专利再曝光
-
-
小幺精时尚手记好看炸了,今夏必买“瘦瘦裙”!显瘦又减龄
-
宁夏银川|宁夏银川:新建居住区须按标准配建养老服务设施