HTML5 & canvas fingerprinting

demo

https://codepen.io/xgqfrms/full/BaoMWMp


window.addEventListener(`load`, () => {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext("2d");
ctx.font = "30px Arial";
ctx.fillText("Hello World",10,50);
ctx.moveTo(0,60);
ctx.lineTo(200,60);
ctx.stroke(); const b64 = canvas.toDataURL().replace("data:image/png;base64,","");
// console.log(b64);
const len = b64.length;
const header = b64.slice(0, 7);
const footer = b64.slice(len - 7);
const html = `<span class="keyword">${header}</span>...<span class="keyword">${footer}</span>`; const pre = document.querySelector(`[data-uid="pre"]`);
// pre.value = b64;
// pre.innerText = b64;
pre.innerHTML = b64; const dom = document.querySelector(`[data-uid="dom"]`);
// dom.innerText = b64;
dom.insertAdjacentHTML(`afterbegin`, html);
});

*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
h1, [data-uid="dom"] {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
} [data-uid="pre"] {
// display: flex;
// justify-content: center;
// align-items: center;
text-align: left;
max-width: 80vw;
overflow-x: hidden;
overflow-y: auto;
background: #000;
color: green;
min-height: 50vh;
height: 70vh;
// height: auto;
font-size: 16px;
line-height: 1.5em;
word-break: break-word;
white-space: normal;
// overflow-wrap: break-word;
padding: 10px;
} footer {
position: fixed;
bottom: 10px;
left: 0;
right: 0;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: lightgreen;
font-size: 16px;
line-height: 1.5em;
padding: 10px;
}

canvas 指纹, UUID

canvas fingerprinting

https://browserleaks.com/canvas

https://blog.allenchou.cc/canvas-fingerprinting/

/*

http://phpjs.org/functions/bin2hex/

http://kevin.vanzonneveld.net

http://phpjs.org/functions/bin2hex:361#comment_177616

*/
function bin2hex(s) {
let i, l, o = '', n;
s += '';
for (i = 0, l = s.length; i < l; i++) {
n = s.charCodeAt(i)
.toString(16);
o += n.length < 2 ? '0' + n : n;
}
return o;
} const getUUID = (domain = ``) => {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext(2d);
ctx.textBaseline = top;
ctx.font = 14px 'Arial';
ctx.textBaseline = tencent;
ctx.fillStyle = #f60;
ctx.fillRect(125,1,62,20);
ctx.fillStyle = #069;
ctx.fillText(domain, 2, 15);
ctx.fillStyle = rgba(102, 204, 0, 0.7);
ctx.fillText(txt, 4, 17); const b64 = canvas.toDataURL().replace(data:image/png;base64,,);
const bin = atob(b64);
const crc = bin2hex(bin.slice(-16,-12));
return crc;
} const log = console.log; const uuid = getUUID(`https://www.xgqfrms.xyz/`); log(`canvas uuid`, uuid );

反 canvas 指纹追踪

覆写 canvas 的原型方法,添加随机干扰项

incognito 隐身模式, 亲测不好使

https://juejin.im/post/5d97fb5ef265da5ba12cdea9

https://blog.csdn.net/Revivedsun/article/details/103534149

https://paper.seebug.org/229/

https://security.tencent.com/index.php/blog/msg/59

https://www.freebuf.com/news/40745.html

https://thehackernews.com/2014/07/html5-canvas-fingerprint-widely-used.html

http://docs.multilogin.com/l/zh/article/7gNVYHcFKG-canvas

https://www.cnblogs.com/leijing0607/p/8044218.html


fingerprint

https://github.com/Valve/fingerprintJS



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


HTML5 & canvas fingerprinting的更多相关文章

  1. HTML5 + JS 网站追踪技术:帆布指纹识别 Canvas FingerPrinting Universally Unique Identifier,简称UUID

    1 1 1 HTML5 + JS  网站追踪技术:帆布指纹识别 Canvas FingerPrinting 1 一般情况下,网站或者广告联盟都会非常想要一种技术方式可以在网络上精确定位到每一个个体,这 ...

  2. 帆布指纹识别(canvas fingerprinting)

    广告联盟或许网站运营者都希望能够精准定位并标识每一个个体,通过对用户行为的分析(浏览了哪些页面?搜索了哪些关键字?对什么感兴趣?点了哪些按钮?用了哪些功能?看了哪些商品?把哪些放入了购物车等等),为用 ...

  3. HTML5 程序设计 - 使用HTML5 Canvas API

    请你跟着本篇示例代码实现每个示例,30分钟后,你会高喊:“HTML5 Canvas?!在哥面前,那都不是事儿!” 呵呵.不要被滚动条吓到,很多都是代码和图片.我没有分开写,不过上面给大家提供了目录,方 ...

  4. 赠书:HTML5 Canvas 2d 编程必读的两本经典

    赠书:HTML5 Canvas 2d 编程必读的两本经典 这两年多一直在和HTML5 Canvas 打交道,也带领团队开发了世界首款基于HTML5 Canvas 的演示文档工具---AxeSlide( ...

  5. 如何开发一个简单的HTML5 Canvas 小游戏

    原文:How to make a simple HTML5 Canvas game 想要快速上手HTML5 Canvas小游戏开发?下面通过一个例子来进行手把手教学.(如果你怀疑我的资历, A Wiz ...

  6. html5 canvas常用api总结(一)

    1.监听浏览器加载事件. window.addEventListener("load",eventWindowLoaded,false); load事件在html页面加载结束时发生 ...

  7. HTML5 Canvas绘制转盘抽奖

    新项目:完整的Canvas转盘抽奖代码 https://github.com/givebest/GB-canvas-turntable 演示 http://blog.givebest.cn/GB-ca ...

  8. html5 canvas首屏自适应背景动画循环效果代码

    模板描述:html5 canvas首屏自适应背景动画循环效果代码 由于动态图太大,怕以后服务器受不了,所以现在都改为静态图了,大家点击演示地址一样的,希望大家喜欢,你们的支持就是小海的动力!! 欢迎大 ...

  9. 自己写的HTML5 Canvas + Javascript五子棋

    看到一些曾经只会灌水的网友,在学习了前端之后,已经能写出下载量几千几万的脚本.样式,帮助大众,成为受欢迎的人,感觉满羡慕的.我也想学会前端技术,变得受欢迎呀.于是心血来潮,开始学习前端知识,并写下了这 ...

随机推荐

  1. MySQL如何安全的给小表加字段

    MySQL学习笔记-如何安全的给小表加字段 如果要给一个大表加字段,你一般都会非常谨慎小心,以免对线上业务造成影响,但实际上给一个小表加字段不慎操作也会导致线上业务出问题,这篇文章主要学习一下MySQ ...

  2. Language Guide (proto3) | proto3 语言指南(四)枚举类型

    枚举类型 定义消息类型时,可能希望其中一个字段只包含预定义值列表中的一个.例如,假设您想为每个SearchRequest添加一个corpus(语料库)字段,其中语料库的值可以是UNIVERSAL.WE ...

  3. 渗透测试流程&mdash;&mdash;渗透测试的9个步骤(转)

    目录 明确目标 分析风险,获得授权 信息收集 漏洞探测(手动&自动) 漏洞验证 信息分析 利用漏洞,获取数据 信息整理 形成报告 1.明确目标 1)确定范围:测试的范围,如:IP.域名.内外网 ...

  4. SpringMVC系列(一)核心:处理请求流程

    http://blog.csdn.net/zhaolijing2012/article/details/41596803

  5. PostgreSQL 实现定时任务的 4 种方法

    数据库定时任务可以用于实现定期的备份.统计信息采集.数据汇总.数据清理与优化等.PostgreSQL 没有提供类似 Oracle.MySQL 以及 Microsoft SQL Sever 的内置任务调 ...

  6. Codeforces Round #628 (Div. 2) D. Ehab the Xorcist(异或,思维题)

    题意: 寻找异或后值为 u,相加后和为 v 的最短数组. 思路: 异或得 u ,则 v 至少应大于等于 u ,且多出来的部分可以等分为两份相消. 即初始数组为 u , (v-u)/2 , (v-u)/ ...

  7. HDU - 6030 矩阵快速幂 +多组输入快速幂板子

    题意:一个项链用n个珠子构成,是一个条而不是一个环,由红和蓝两种颜色构成,要求以任意点为起点向后的素数个珠子中,保证红颜色的大于等于蓝颜色的,问你有多少种方案满足,范围:n(2≤n≤1018) 推导过 ...

  8. Codeforces Round #479 (Div. 3) E. Cyclic Components (思维,DFS)

    题意:给你\(n\)个顶点和\(m\)条边,问它们有多少个单环(无杂环),例如图中第二个就是一个杂环. 题解:不难发现,如果某几个点能够构成单环,那么每个点一定只能连两条边.所以我们先构建邻接表,然后 ...

  9. 树状数组 && 板子

    本文树状数组讲解转载于:https://www.cnblogs.com/xenny/p/9739600.html 本文新加内容为模板代码部分 1.什么是树状数组? 顾名思义,就是用数组来模拟树形结构呗 ...

  10. SQL 计算表A字段在表B字段中出现的次数

    SELECT A.Id,A.Name,COUNT(B.LiveID) AS count from SetLiveHistory B RIGHT JOIN Live A ON B.LiveId=A.Id ...