- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
-
「客运量」中国列车远渡古巴,仅20天客运量激增3倍,当地果然是
-
『星座小蝌蚪』4月天赐鸿运,吉运横生,事业一路兴旺鼠年小祝福:,吉星照耀的5大生肖
-
棕色土耳其无花果种植方法 棕色土耳其无花果种植方法图片
-
你的地方|骂英达人渣,嫌巴图“废物”,“喜剧女王”宋丹丹背后的悲剧
-
-
-
-
-
DM科技|折叠屏设计大改,不再是好评众多,三星设计专利再曝光
-
国际狗仔@双手差点被斧头砍掉,印度消杀工人遭暴徒围殴毒打
-
-
秦朝|为什么秦国能统一六国?这3件东西,那个年代就不该存在
-
-
-
-
【医生】总感觉大便排不干净,排完还想排,但又排不出,说明什么问题?
-
淘宝怎么优化关键词 如何优化淘宝店铺宝贝的标题关键词?
-
欢乐喜剧人|同样是《欢乐喜剧人》冠军,他们都火了,只有一个人名声渐退!
-
看电视|三大视频平台同题作文突围法宝何在?,独家观察||独居观察类综艺集中上线