- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
#小小白说军事#4月5日全球军事:罗斯福号航母舰长被指控泄露军事机密被解职
-
王小北Air联想小新15 2020锐龙版烤机测试:野兽模式37.5W,性价比首选
-
-
-
-
江门广播电视台|“献血达人”谭兆雷:12年献出14个成年人血量之和
-
华晨集团|仪表盘上的“乌龟晒太阳”是啥意思?老司机: 赶紧刹车
-
八旬老人:与其去儿子家被啃老,不如请保姆照顾自己,这样更舒心
-
海陆空天视频|1.5万大军从德国撤出,特朗普下令彻底放弃,美国招呼也不打一声
-
清廷|陈寅恪先生笔下的女侠名姝:河东君柳如是小传之从柳如是到柳儒士
-
-
巴萨|梅西不再受保护?巴萨遭赛季首败提抗议!这么明显犯规都不给牌?
-
『胖哥汽车频道』跨界版两厢马自达3,马自达国产CX-30前脸量产
-
-
『陈情令演员郑繁星开怼公司』《陈情令》演员郑繁星开怼公司?深夜发文秒删
-
-
公元|拉合尔古堡的前身是泥筑的堡垒,始建于公元1021年
-
[健身]小伙每天做仰卧起坐、悬垂举腿各100个,坚持1个月,看变化
-
-