WMI 是制作硬件指纹的好方法吗?

发布于 2024-12-20 16:56:01 字数 526 浏览 0 评论 0原文

我想制作一个 C++ 安装部署的 Windows 应用程序来检查硬件指纹(以验证用户是否仅在他的计算机上使用该应用程序)。经过一些网络研究后,我决定 WMI 是我的工具。我从一个简单的 MFC 应用程序开始,首先我想打印出主板序列号。就在这时,整个事情崩溃了。我在XP和Win7上检查过,这个属性没有返回。这让我开始思考 - 如果某些类/属性在某些 Windows 版本上不起作用怎么办?或者一些硬件配置?我真诚地不喜欢这样。我对指纹的即时想法是 MAC 地址(我的应用程序严格由网络驱动,因此如果机器没有网络连接,则根本没有用)。但是,某些机器可以有多个 MAC 设备。有些MAC可能是虚拟的,卸载后会从系统中消失(即VPN客户端)。我认为 MAC 地址可以很容易地更改,但如果我对数字进行哈希编码,用户可能无法弄清楚使用它。所以我请求您的建议 - WMI 是硬件指纹的好工具吗?如果是 - 您建议使用哪些类/属性?它们应该在所有机器和系统上工作,同时也是安全/不可更改的(好吧,如果用户更改整个硬件,我们就无能为力......)如果 WMI 不是一个好的解决方案,那么您会建议使用其他 C++ 框架?接下来 - 然后使用哪些高清属性。

I want to make a c++ install deployed windows application that would check hardware fingerprint (to verify that the user will use the application only on his computer). After some net research I decided that WMI is my tool. I started with a simple MFC application and for start I wanted to print out the MotherBoard SerialNumber. And just at this point the whole thing crashed. I checked on XP and Win7 and this property is not returned. And this got me thinking - what if there are some classes/properties that won't work on certain windows versions? Or some hardware configurations? I sincerely don't like that. My instant idea for the fingerprint was the MAC address (my application is strictly network driven so if the machine does not have a net connection it is no use at all). However, some machines can have several MAC devices. And some of MACs may be a virtual one's that can vanish from the system after uninstalling (i.e. VPN client). I think that MAC address can be easily changed but if I hashcode the number the user may not figure out that use it. So I ask for your advice - is WMI a good tool for Hardware fingerprint? If it is - which classes/properties would you suggest to use? They should work on all machines and systems and also be safe/unchangeable at the same time (ok we cannot do much if the user changes the whole hardware..) If WMI is not a good solution, than what other C++ framework would you suggest? And following - which HD properties to use then.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心凉 2024-12-27 16:56:01

是的,WMI 是完成此任务的一个非常好的选择,关键是选择要使用的正确的类和属性,或者更好的是您可以访问 SMBIOS 表来获取有关系统的信息并生成唯一标识符。前段时间我在博客上写了关于这两个主题的博客,代码是用delphi编写的,但可以很容易地翻译成C++

Yes, the WMI is a very good option to do this task, the key is choose the right classes and properties to use or even better you can access the SMBIOS tables to get information about the system and generate a unique identifier. some time ago I blogged about both subjects, the code is in delphi but can be easily translatable to C++

苍风燃霜 2024-12-27 16:56:01

根据我的经验,不会。WMI 似乎很慢并且有时不准确。最好使用较低级别的方法并使用 Win32 API 直接查询硬件。

From my experience, No. WMI seems to be slow and sometime inaccurate. It would be better to use lower level methods and to query the hardware directly using Win32 API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文