有关硬件 ID 的帮助

发布于 2024-09-13 01:47:59 字数 473 浏览 4 评论 0原文

我正在使用 C# 和 .NET 2.0。我的应用程序需要某种方法来检查不同的用户,所以我将使用硬件 ID,但我发现我只能使用:

  • mac 地址 - 很容易更改,并不是每个人都拥有它 // 无
  • 处理器 id - 使用 WMI 它返回一个值cpu型号,它不是唯一的 // 没有
  • 主板序列号 - 不是每个主板都有它 // 没有
  • Windows 的卷序列号 - 我不确定它是否会在 Windows 重新安装和卷格式上更改

所以有什么我没有做的吗没有提到 hwid 吗?我想要每个人都拥有的东西,并且它不会在 Windows 重新安装时被删除。否则我就必须使用 Windows 的卷序列号。


编辑:从评论中我认为最好使用 HDD id。如何获得? EDIT2:我刚刚读到 SCSI 驱动器没有串行。这是真的吗?

最终编辑:我已经在我的应用程序上使用根驱动器序列号。效果非常好。谢谢大家。

I'm using C# and .NET 2.0. My app needs some way to check the different users so I'll use hardware id, but I saw that I can use only:

  • mac address - easily changeable and not everybody have it // NO
  • processor id - using WMI it returns a value for the cpu model, it's not unique // NO
  • motherboard serial - not every motherboard have it // NO
  • the Windows's volume serial - I'm not sure if it will be changed on Windows reinstall and format of the volume

So is there something I didn't mention for hwid? I want something that everybody have and it won't be erased on windows reinstall. Else I'd have to use the windows's volume serial number.


EDIT: From the commments I think it's best to use HDD id. How to get it?
EDIT2: I just read that the SCSI drives don't have serial. Is that true?

FINAL EDIT: I'm already using the root drive serial on my app. It work's pretty well. Thanks all.

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

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

发布评论

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

评论(5

山有枢 2024-09-20 01:47:59

硬盘序列号:唯一,不可更改,每个人都有。

这不是一个完美的选择,但是...

HDD Serial number: unique, unchangeable, and everyone has it.

not a perfect option but...

终陌 2024-09-20 01:47:59

好吧,我会选择多个 id。如果您组合足够多的 ID,它们将为您带来足够的唯一性。

编辑:您也可以去硬盘上安装程序的位置(盘片、圆柱体等)

Well i'd go for more than one id. If you combine enough IDs they will get you enough uniqueness.

EDIT: you might also go for the place on the harddisk your program was installed too (Platter, Cylinder etc.)

北风几吹夏 2024-09-20 01:47:59

为什么要使用硬件ID?我自己会选择某种基于表单(或基于 AD)的安全性。

然而,考虑到这一点:HWID 的特点是它可以标识特定的计算机配置:它的设计目的是在系统发生更改时进行更改。您提到 Windows 卷序列号可能会在重新安装和重新格式化时发生变化,但是此时您的软件是否也必须重新安装?例如,如果用户出于某种原因更换硬盘,硬盘串行也可能会发生变化。

如果您必须使用 HWID,您可能需要选择一个(或多个)可用选项来提供唯一性,并进行编码或通知用户需要重新安装和/或重新配置软件的硬件更改。

Why do you want to use hardware Id? I'd go with some kind of forms-based (or AD based) security, myself.

Given that, however: The thing about HWID is that it identifies that particular computer configuration: it is designed to change if there are system changes. You mention that Windows Volume Serial could change on reinstall and reformat, but won't your software also have to be reinstalled at that point? HDD Serial could also change if, say, the user swaps HDDs for some reason.

If you have to use HWID, you'll probably need to select one (or more) of the available options to provide uniqueness and either code around, or inform users about, hardware changes requiring a re-install and/or reconfigure of your software.

逆光下的微笑 2024-09-20 01:47:59

MAC 地址不太可靠。
您应该使用无法更改的内容,例如 CPU ID 或 HDD IDE ID。

我的意思是:
http://www.soft.tahionic.com/download-hdd_id/index.html
http://www.soft.tahionic.com /download-hdd_id/hardware%20ID%20programmer%27s%20DLL.html


回答你的问题,是的,SCSI没有硬件ID。

The MAC address is not very reliable.
You should use something that cannot be changed such a CPU ID or HDD IDE ID.

Here is want I mean:
http://www.soft.tahionic.com/download-hdd_id/index.html
http://www.soft.tahionic.com/download-hdd_id/hardware%20ID%20programmer%27s%20DLL.html


And to answer your question, Yes, SCSI does not have a hardware ID.

季末如歌 2024-09-20 01:47:59

您是否必须考虑安全性或仅考虑可靠性,即用户是否想要篡改您的身份检查?
如果您需要(高)安全性,请购买一种“软件保护”产品,这比自己动手便宜得多。

安全性要求不高? =>
另一种可能性是使用用户或机器 SID。您必须考虑到您的应用程序是在 elevated => 执行的那么用户就是管理员。

最后但并非最不重要的一点是:将一些字节的随机值写入 HKEY_CURRENT_USER 下的注册表(可能在各个位置),并将它们用作 ID。

Do you have to think about security or only reliability, i.e. does the user want to tamper your ID check?
If you need (high) security, buy one of the "software protection" products, this is far cheaper than to do it yourself.

No high security required? =>
Another possibility is to use the User or Machine SID. You have to take into account that your application is executed elvated => User is Administrator then.

Last but not least: Write a random value of some bytes into the registry (possibly at various places) under HKEY_CURRENT_USER and use these as an ID.

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