{"id":4333,"date":"2019-03-02T09:08:33","date_gmt":"2019-03-02T01:08:33","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=4333"},"modified":"2019-03-02T09:08:33","modified_gmt":"2019-03-02T01:08:33","slug":"web%e6%b5%8f%e8%a7%88%e5%99%a8%e7%9a%84%e8%ae%be%e5%a4%87%e6%8c%87%e7%ba%b9%e7%9a%84%e5%b8%b8%e7%94%a8%e7%89%b9%e5%be%81%e5%92%8c%e6%8c%87%e6%a0%87","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/4333.html","title":{"rendered":"Web\u6d4f\u89c8\u5668\u7684\u8bbe\u5907\u6307\u7eb9\u7684\u5e38\u7528\u7279\u5f81\u548c\u6307\u6807"},"content":{"rendered":"<p>=Start=<\/p>\n<h4 id=\"id-\u6a21\u677f-\u7f18\u7531\uff1a\">\u7f18\u7531\uff1a<\/h4>\n<p>\u5728\u4ecb\u7ecd\u5b8c\u4e86Web\u6307\u7eb9\u7684\u5927\u4f53\u601d\u8def\u548c\u539f\u7406\u4e4b\u540e\uff0c\u8fd9\u91cc\u518d\u6574\u7406\u4e00\u4e0bWeb\u6307\u7eb9\u7684\u5e38\u7528\u7279\u5f81\u53ca\u5176\u6307\u6807\uff0c\u65b9\u4fbf\u63d0\u9700\u6c42\u548c\u6d4b\u6548\u679c\u7684\u65f6\u5019\u7528\u5230\u3002<\/p>\n<h4 id=\"id-\u6a21\u677f-\u6b63\u6587\uff1a\">\u6b63\u6587\uff1a<\/h4>\n<h5 id=\"id-\u6a21\u677f-\u53c2\u8003\u89e3\u7b54\uff1a\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n<p>\u5e38\u89c1\u7279\u5f81\u7684\u71b5\u503c\uff08\u71b5\u503c\u8d8a\u9ad8\u8868\u793a\u552f\u4e00\u6027\u8d8a\u4f4e\uff0c\u53cd\u4e4b\u4ea6\u7136\uff09\uff1a<\/p>\n<table border=\"1\" cellpadding=\"6\">\n<tbody>\n<tr>\n<td><b>\u7279\u5f81<\/b><\/td>\n<td><b>\u71b5 (bits)<\/b><\/td>\n<\/tr>\n<tr>\n<td>plugins<\/td>\n<td>15.4<\/td>\n<\/tr>\n<tr>\n<td>fonts<\/td>\n<td>13.9<\/td>\n<\/tr>\n<tr>\n<td>user agent<\/td>\n<td>10.0<\/td>\n<\/tr>\n<tr>\n<td>http accept<\/td>\n<td>6.09<\/td>\n<\/tr>\n<tr>\n<td>screen resolution<\/td>\n<td>4.83<\/td>\n<\/tr>\n<tr>\n<td>timezone<\/td>\n<td>3.04<\/td>\n<\/tr>\n<tr>\n<td>supercookies<\/td>\n<td>2.12<\/td>\n<\/tr>\n<tr>\n<td>cookies enabled<\/td>\n<td>0.353<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u8fd8\u6709\u66f4\u5168\u7684\u2014\u2014\u4e0d\u540c\u7279\u5f81\u5728\u8de8\u6d4f\u89c8\u5668\u6d4b\u8bd5\u4e2d\u7684\u71b5\u503c\uff1a<\/p>\n<figure id=\"attachment_4334\" aria-describedby=\"caption-attachment-4334\" style=\"width: 716px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4334\" src=\"https:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2019\/03\/\u8de8\u6d4f\u89c8\u5668\u7279\u5f81\u7684\u7a33\u5b9a\u6027.jpg\" alt=\"\" width=\"716\" height=\"1788\" srcset=\"https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/03\/\u8de8\u6d4f\u89c8\u5668\u7279\u5f81\u7684\u7a33\u5b9a\u6027.jpg 716w, https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/03\/\u8de8\u6d4f\u89c8\u5668\u7279\u5f81\u7684\u7a33\u5b9a\u6027-120x300.jpg 120w, https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/03\/\u8de8\u6d4f\u89c8\u5668\u7279\u5f81\u7684\u7a33\u5b9a\u6027-410x1024.jpg 410w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><figcaption id=\"caption-attachment-4334\" class=\"wp-caption-text\">Entropy and Cross-browser Stability by Features<\/figcaption><\/figure>\n<p><a href=\"https:\/\/amiunique.org\/faq\" target=\"_blank\" rel=\"noopener\">amiunique.org<\/a>\u5728\u6d4b\u8bd5\u65f6\u4f1a\u6536\u96c6\u7684\u4e00\u4e9b\u4fe1\u606f\uff1a<\/p>\n<ul>\n<li>the User agent header<\/li>\n<li>the Accept header<\/li>\n<li>the Connection header<\/li>\n<li>the Encoding header<\/li>\n<li>the Language header<\/li>\n<li>the list of plugins<\/li>\n<li>the platform<\/li>\n<li>the cookies preferences (allowed or not)<\/li>\n<li>the Do Not Track preferences (yes, no or not communicated)<\/li>\n<li>the timezone<\/li>\n<li>the screen resolution and its color depth<\/li>\n<li>the use of local storage<\/li>\n<li>the use of session storage<\/li>\n<li>a picture rendered with the HTML Canvas element<\/li>\n<li>a picture rendered with WebGL<\/li>\n<li>the presence of AdBlock<\/li>\n<li>the list of fonts<\/li>\n<\/ul>\n<p>\u6536\u96c6\u8fd9\u4e9b\u4fe1\u606f\u65f6\u9700\u8981\u7528\u5230\u7684\u4e00\u4e9b\u6280\u672f\uff1a<\/p>\n<ul>\n<li>UserAgent\u548cAccept\u5934\u8fd9\u4e9b\u4fe1\u606f\u5728\u548c\u7f51\u7ad9\u5efa\u7acb\u8fde\u63a5\u65f6\u4f1a\u81ea\u52a8\u53d1\u9001\u8fc7\u53bb\u3002The\u00a0<a href=\"http:\/\/useragentstring.com\/\">user agent<\/a>\u00a0and the\u00a0<a href=\"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html\">accept headers<\/a>\u00a0are automatically sent to websites when a connection is initiated.<\/li>\n<li>\u901a\u8fc7JavaScript\u53ef\u4ee5\u62ff\u5230\u4e00\u4e9b\u6d4f\u89c8\u5668\u7684\u7279\u6027\uff0c\u6bd4\u5982\u5b89\u88c5\u7684\u63d2\u4ef6\u4fe1\u606f\u3002<a href=\"https:\/\/en.wikipedia.org\/wiki\/JavaScript\">JavaScript<\/a>\u00a0gives access to many browser-populated features like the plugins installed on the user\u2019s device.<\/li>\n<li>\u5982\u679c\u5b89\u88c5\u4e86Flash\u63d2\u4ef6\uff0c\u5b83\u7684API\u63d0\u4f9b\u4e86\u5bf9\u8bb8\u591a\u7cfb\u7edf\u7279\u5b9a\u5c5e\u6027\u7684\u8bbf\u95ee\uff0c\u6bd4\u5982\uff1a\u64cd\u4f5c\u7cfb\u7edf\u7684\u7cbe\u786e\u7248\u672c\u3001\u5b57\u4f53\u5217\u8868\u3001\u5c4f\u5e55\u5206\u8fa8\u7387\u3001\u65f6\u533a\u3002If the\u00a0<a href=\"https:\/\/www.adobe.com\/fr\/products\/flashruntimes.html\">Flash plugin<\/a>\u00a0is installed, its rich programming interface (API) provides access to many system-specific attributes: exact version of the operating system, list of fonts, screen resolution, timezone.<\/li>\n<li>\u5728HTML5\u4e2d\u901a\u8fc7\u5c55\u793aCanvas\u5143\u7d20\uff0c\u53ef\u4ee5\u5728\u786c\u4ef6\u6216\u8f6f\u4ef6\u914d\u7f6e\u4e2d\u6536\u96c6\u5230\u7ec6\u5fae\u7684\u5dee\u5f02\uff0c\u8fd9\u8981\u5f52\u529f\u4e8e\u8bbe\u5907\u4e4b\u95f4\u5728\u56fe\u50cf\u5448\u73b0\u65b9\u9762\u7684\u7ec6\u5fae\u5dee\u5f02\u3002\u53ef\u4ee5\u68c0\u6d4b\u5230\u6700\u5c0f\u7684\u50cf\u7d20\u5dee\u3002\u8fd9\u53eb\u505a\u5e06\u5e03\u6307\u7eb9\u3002Through the display of an HTML5 Canvas element, it is possible to collect small differences in the hardware or in the software configurations, thanks to slight differences in the image rendering between devices. The smallest pixel difference can be detected. This is called\u00a0<a href=\"https:\/\/securehomes.esat.kuleuven.be\/~gacar\/persistent\/#canvas-results\">canvas fingerprinting\u00a0<\/a>.<\/li>\n<\/ul>\n<hr \/>\n<p>\u672c\u5730\u6d4b\u8bd5clientjs\u548cfingerprint2.js\u7684\u65b9\u6cd5\uff1a<\/p>\n<p>\u65b0\u5efa\u4e00\u4e2aHTML\u6587\u4ef6\uff0c\u5728\u5176\u4e2d\u7528&lt;script&gt;\u6807\u7b7e\u5f15\u5165\u76f8\u5173js\u6587\u4ef6\uff0c\u7136\u540e\u901a\u8fc7\u5728HTML\u6587\u4ef6\u4e2d\u5199js\u4ee3\u7801\u6216\u662f\u5728console\u4e0a\u8f93\u5165js\u4ee3\u7801\u6765\u8fdb\u884c\u7b80\u5355\u7684\u624b\u5de5\u6d4b\u8bd5\uff1a<\/p>\n<pre class=\"lang:default decode:true \">&lt;!-- \u4ee5\u4e0b\u662f fingerprintjs2 \u7684\u6d4b\u8bd5\u65b9\u6cd5 --&gt;\r\n&lt;!-- \u6d4b\u8bd5\u60c5\u51b5\u4e0d\u592a\u4e50\u89c2\uff0c\u6211\u7684Mac\u4e0a\u7684Chrome\u548cSafari\u7684\u54c8\u5e0c\u503c\u4e0d\u76f8\u540c\u3002\u3002\u3002 --&gt;\r\n\r\nvar options = {fonts: {extendedJsFonts: true}, excludes: {userAgent: true}}\r\nvar options = {}\r\n\r\nif (window.requestIdleCallback) {\r\n    requestIdleCallback(function () {\r\n        Fingerprint2.get(options, function (components) {\r\n            console.log(components) \/\/ an array of components: {key: ..., value: ...}\r\n            var values = components.map(function (component) { return component.value })\r\n            console.log(values)\r\n            var murmur = Fingerprint2.x64hash128(values.join(''), 31)\r\n            console.log(murmur)\r\n        })\r\n    })\r\n} else {\r\n    setTimeout(function () {\r\n        Fingerprint2.get(options, function (components) {\r\n            console.log(components) \/\/ an array of components: {key: ..., value: ...}\r\n            var values = components.map(function (component) { return component.value })\r\n            console.log(values)\r\n            var murmur = Fingerprint2.x64hash128(values.join(''), 31)\r\n            console.log(murmur)\r\n        })  \r\n    }, 500)\r\n}\r\n\r\n\r\n&lt;!-- \u4e0d\u5ef6\u8fdf\uff0c\u76f4\u63a5\u6253\u5370\u51fa\u6765\uff08\u5b98\u65b9\u4e0d\u63a8\u8350\u8fd9\u4e48\u505a\uff09 --&gt;\r\nvar options = {};\r\nFingerprint2.getV18(options, function (result, components) {\r\n  \/\/ result is murmur hash fingerprint\r\n  console.log(result); \/\/a hash, representingyour device fingerprint\r\n  \/\/ components is array of {key: 'foo', value: 'component value'}\r\n  console.log(components); \/\/ an array of FPcomponents\r\n})\r\n\r\n\r\nFingerprint2.get(options, function (components) {\r\n    var values = components.map(function (component) { return component.value })\r\n    console.log(values)\r\n    var murmur = Fingerprint2.x64hash128(values.join(''), 31)\r\n    console.log(murmur)\r\n})\r\n\r\n\r\n\r\n&lt;!-- \u4ee5\u4e0b\u662f ClientJS \u7684\u6d4b\u8bd5\u65b9\u6cd5 --&gt;\r\n\r\n\/\/ Create a new ClientJS object\r\nvar client = new ClientJS();\r\n\r\n\/\/ Get the client's fingerprint id\r\nvar fingerprint = client.getFingerprint();\r\n\r\n\/\/ Print the 32bit hash id to the console\r\nconsole.log(fingerprint);\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h5 id=\"id-\u6a21\u677f-\u53c2\u8003\u94fe\u63a5\uff1a\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n<ul>\n<li><a href=\"https:\/\/amiunique.org\/faq\">https:\/\/amiunique.org\/faq<\/a><\/li>\n<li><a href=\"https:\/\/panopticlick.eff.org\/static\/browser-uniqueness.pdf\">https:\/\/panopticlick.eff.org\/static\/browser-uniqueness.pdf<\/a><\/li>\n<li><a href=\"http:\/\/yinzhicao.org\/TrackingFree\/crossbrowsertracking_NDSS17.pdf\">http:\/\/yinzhicao.org\/TrackingFree\/crossbrowsertracking_NDSS17.pdf<\/a><\/li>\n<li><a href=\"https:\/\/securehomes.esat.kuleuven.be\/~gacar\/persistent\/#canvas-results\">https:\/\/securehomes.esat.kuleuven.be\/~gacar\/persistent\/#canvas-results<\/a><\/li>\n<li><a href=\"https:\/\/wiki.mozilla.org\/Fingerprinting\">https:\/\/wiki.mozilla.org\/Fingerprinting<\/a><\/li>\n<li><a href=\"https:\/\/www.adobe.com\/fr\/products\/flashruntimes.html\">https:\/\/www.adobe.com\/fr\/products\/flashruntimes.html<\/a><\/li>\n<\/ul>\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u5728\u4ecb\u7ecd\u5b8c\u4e86Web\u6307\u7eb9\u7684\u5927\u4f53\u601d\u8def\u548c\u539f\u7406\u4e4b\u540e\uff0c\u8fd9\u91cc\u518d\u6574\u7406\u4e00\u4e0bWeb\u6307\u7eb9\u7684\u5e38\u7528\u7279\u5f81\u53ca\u5176\u6307\u6807\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,25,12],"tags":[1332,1329,62,1330],"class_list":["post-4333","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-security","category-tools","tag-amiunique","tag-fingerprint","tag-javascript","tag-1330"],"views":11896,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=4333"}],"version-history":[{"count":1,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4333\/revisions"}],"predecessor-version":[{"id":4335,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4333\/revisions\/4335"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=4333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=4333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=4333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}