开发者

When copy protecting, how to check the real date against an expiration date [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

Improve this question

...working on a primitive RSA (public/private key) based copy protection mechanism for our software. We are not using 3rd party products, but are implementing Microsoft's LicenseProvider model. We have ways in place to identify the specific computer, but have not figured out how to check the current date against an expiration date stored in the license file (.lic).

DateTime.Today obviously is taking the system's date, but what if the user keeps resetting the date to something prior to the expiration date?

Any simpel ideas how this could be more bullet proof, other than 开发者_如何转开发fetching the date from an online source? Again, nothing fancy, but better than DateTime.Today :)

As usual, thanks so much!


You can store the date you last checked the license encrypted in the registry. This will provide you with a consistent date and it can also be used to see if the user has set back his system date.


You could always use a managed NTP client and fetch the time from an NTP server. (Note that a smart user could use their hosts file to redirect the NTP queries to a fake NTP server under their control, but there's really only so much you can do about this.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜