我需要找出一种方法,唯一地识别每台计算机访问我正在创建的网站。有人有什么建议吗?
因为我想解决方案工作在所有机器和所有浏览器(在合理的范围内),我试图使用javascript创建一个解决方案。
饼干可不行。
我需要基本上创建一个guid的能力,这是唯一的计算机和可重复的,假设没有硬件变化发生在计算机上。我正在考虑的方向是获得网卡的MAC和这种性质的其他信息,这将id访问网站的机器。
我需要找出一种方法,唯一地识别每台计算机访问我正在创建的网站。有人有什么建议吗?
因为我想解决方案工作在所有机器和所有浏览器(在合理的范围内),我试图使用javascript创建一个解决方案。
饼干可不行。
我需要基本上创建一个guid的能力,这是唯一的计算机和可重复的,假设没有硬件变化发生在计算机上。我正在考虑的方向是获得网卡的MAC和这种性质的其他信息,这将id访问网站的机器。
当前回答
我觉得饼干可能就是你要找的东西;这是大多数网站唯一识别访问者的方式。
其他回答
有一种流行的方法叫做“画布指纹”,在这篇科学文章《网络永不遗忘》中有描述: 野外的持久跟踪机制。一旦你开始寻找它,你会惊讶于它被使用的频率。该方法创建一个唯一的指纹,该指纹对于每个浏览器/硬件组合都是一致的。
本文还介绍了其他持久跟踪方法,如evercookie、respawning http和Flash cookie以及cookie同步。
更多关于画布指纹的信息:
完美像素:HTML5中的指纹画布 https://en.wikipedia.org/wiki/Canvas_fingerprinting
通过HTTP连接只能获得少量信息。
IP - But as others have said, this is not fixed for many, if not most Internet users due to their ISP's dynamic allocation policies. Useragent String - Nearly all browsers send what kind of browser they are with every request. However, this can be set by the user in many browsers today. Collection of request fields - There are other fields sent with each request, such as supported encodings, etc. These, if used in the aggregate can help to ID a user's machine, but again are browser dependent and can be changed. Cookies - Setting a cookie is another way to identify a machine, or more specifically a browser on a machine, but as others have said, these can be deleted, or turned off by the users, and are only applicable on a browser, not a machine.
So, the correct response is that you cannot achieve what you would live via the HTTP over IP protocols alone. However, using a combination of cookies, as well as IP, and the fields in the HTTP request, you have a good chance at guessing, sort of, what machine it is. Users tend to use only one browser, and often from one machine, so this may be fairly relieable, but this will vary depending on the audience...techies are more likely to mess with this stuff, and use more machines/browsers. Additionally, this could even be coupled with some attempt to geo-locate the IP, and use that data as well. But in any case, there is no solution that will be correct all of the time.
你可能想尝试在evercookie中设置一个唯一的ID(它可以跨浏览器工作,见他们的常见问题): http://samy.pl/evercookie/
还有一家叫做ThreatMetrix的公司,被很多大公司用来解决这个问题: http://threatmetrix.com/our-solutions/solutions-by-product/trustdefender-id/ 它们相当昂贵,而且他们的其他一些产品也不太好,但他们的设备id运行良好。
最后,还有这个开源jquery实现的panopticlick的想法: https://github.com/carlo/jquery-browser-fingerprint 它现在看起来很不成熟,但可以扩展。
希望能有所帮助!
当我使用一台从未访问过我的网上银行网站的机器时,我被要求进行额外的身份验证。然后,如果我第二次回到网上银行网站,我不会被要求额外的身份验证……我删除了IE中的所有cookie,并重新登录到我的网上银行网站,完全期待再次被问到身份验证问题。令我吃惊的是,没有人问我。这难道不会让人相信银行正在做某种不涉及cookie的PC标记吗?
这是银行使用的一种非常常见的身份验证类型。
假设您正在通过example-isp.com访问您的银行网站。第一次登录时,系统会要求您输入密码,并进行额外的身份验证。一旦您通过了认证,银行就知道用户“thatisvaliant”已通过身份验证,可以通过example-isp.com访问该网站。
将来,当您通过example-isp.com访问该网站时,它将不会要求额外的身份验证(除了您的密码)。如果您试图通过another-isp.com访问该银行,该银行将再次执行相同的程序。
总之,银行识别的是你的ISP和/或网络块,基于你的IP地址。显然,ISP上的每个用户都不是你,这就是为什么银行仍然要求你输入密码的原因。
当你在另一个国家使用信用卡时,你有没有接到信用卡公司的电话来核实事情是否正常?相同的概念。
实际上,您想做的事情无法实现,因为协议不允许这样做。如果静态ip被普遍使用,那么你可能就能做到这一点。它们不是,所以你不能。
如果您真的想要识别用户,请让他们登录。
因为它们可能会移动到你网站上的不同页面,你需要一种方法来跟踪它们的移动。
只要他们登录了,你就可以通过cookie /链接参数/信标等跟踪他们在你网站上的会话,你就可以很确定他们在这段时间内使用的是同一台计算机。
最终,如果你的用户没有使用你自己的本地网络,也没有静态IP地址,说这能告诉你他们在使用哪台计算机是不正确的。
如果你想要做的事情是在用户的合作下完成的,每个cookie只有一个用户,他们使用单一的网络浏览器,那就使用cookie。