- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
-
-
封面新闻|30秒|韩星曹政奭升级当爸,妻子GUMMY诞下女儿
-
-
「篮球殿堂」新援被郭士强认可,书豪获尊重,CBA一天4消息!沈梓捷想比肩阿联
-
-
-
行业洞察:晋能科技斩获“最具影响力组件企业奖”,标杆力量
-
-
#小小薇搞笑杂谈#我早就发现破绽了:厨房少了一把刀,笑话:NY设局让闺蜜试探我
-
小面姨美食日记|8月,孩子最馋这种饺子馅,一顿连吃20个,?比韭菜肉馅都好吃,?
-
-
汽车|官方出手!五部门:汽车数据不得违规向境外提供重要数据
-
北青网综合|上海19日无新增新冠肺炎确诊病例 治愈出院5例
-
-
「Intel Core」十代酷睿正式版图片曝光:4月到6月分批发布
-
-
央视新闻|法国巴黎成疫情“最高级别警报区”,将更严格管控
-
属马|属马人在职场快速升职加薪,不是因为好运加持,而是努力的回报
-