产品密钥注册 - Visual Basic

发布于 2024-08-07 14:33:06 字数 131 浏览 4 评论 0原文

我正在尝试为我的程序创建一个产品密钥注册器。我想要数据库或字典类型的产品密钥,这样我就可以每天制作新密钥,而无需将它们放入程序中,并每次都重新分配它们。我不知道从哪里开始,所以如果有人有任何想法请发布,谢谢

凯文

I am trying to make a product key registrar for my program. I want the product keys in a database or a dictionary type thing where I can make new keys everyday without putting them into the program, and redistrubate them everytime. I'm not sure where to get started, so if anyone has any ideas please post them

thanks,

kevin

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

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

发布评论

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

评论(5

欢你一世 2024-08-14 14:33:06

您可以使用高级安装程序。他们有一个内置的许可系统。虽然

成本有点高,但从长远来看,它会为你省钱。当然,你也可以尝试自己制作。独立注册的安全性比检查数据库的注册更具挑战性。

You could use Advanced Installer. They have a licensing system built right in.

Its a bit costly, but it will save you money in the long run. Of course, you could try to make your own. Self-contained registration is a bit more challenging to secure than one that checks a database.

丢了幸福的猪 2024-08-14 14:33:06

查看 Microsoft 提供的共享软件入门工具包(免费)。

http://blogs.msdn.com/danielfe/archive/ 2005/07/10/437293.aspx

Check out the Shareware Starter Kit (free) from Microsoft.

http://blogs.msdn.com/danielfe/archive/2005/07/10/437293.aspx

逆光下的微笑 2024-08-14 14:33:06

一开始就让事情变得简单。如果您需要更高的复杂性或更严格的安全性,请在开发完基本框架后执行此操作。

第一步。查看一些简单的加密算法,例如微型加密算法。熟悉使用单个密钥加密和解密文件。

http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm

下一步。您将需要大量密钥、存储它们的数据库以及与它们关联的某种客户 ID。首先,我们假设客户 ID 是一个从 100000 开始的 6 位数字,密钥是 128 位十六进制格式,数据库是一个简单的文本文件。此时,您应该可以毫无问题地编写一个程序来为接下来的 100 个客户生成一批密钥。

第三步。现在您已经有了数据库,因此可以设置一些脚本或应用程序,以便可以加密特定文件,生成多个副本,每个副本对应每个客户 ID,并使用其密钥进行加密。

第四步,编写一个简短的应用程序,该应用程序获取一个文件,使用密钥对其进行解密,然后加载并运行生成的可执行文件。应用程序终止后,删除解密的文件。

现在,解密和运行的小应用程序必须以某种方式生成多个版本,为每个拥有密钥的客户提供一个版本。最好的方法是生成一个与密钥大小相同的随机数,并将其作为常量放入代码中。然后编译它。此时,像 grep 这样的工具可以找到它在可执行文件中的位置。编写另一个小应用程序来读取解密器应用程序,将标签替换为真实密钥,并写出您将与匹配的解密应用程序一起分发的解密器版本。

此后,您可能想要寻找比 TEA 更好的解密算法,但不要使用过于强大的算法,否则会违反出口法。

请注意,这些都无法阻止坚定的小偷,但它应该可以防止随意的小偷,并且您会学到很多东西。如果应用程序将其自身的关键部分存储在加密的 USB 密钥上,这样硬盘驱动器上就永远不会有解密的副本,那么该应用程序就可以获得更好的安全性。请记住,任何时候您认为自己已经找到了改进加密或代码保护的方法,您很可能是错的。比我们更伟大的人一生都在研究加密,一般规则是,当你稍微偏离公认的算法和用法时,你最终会降低而不是提高安全性。

Keep things simple to begin with. If you need more complexity, or tougher security, then do that after you've got your basic framework developed.

First step. Look at some simple encryption algorithms like the Tiny Encryption Algorithm. Get comfortable with encrypting and decrypting a file using a single key.

http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm

Next step. You will need lots of keys, a database to store them and some kind of customer id to associate with them. To begin with, lets assume that the customer id is a 6 digit number starting at 100000, the key is 128 bits in hex format, and the database is a simple text file. At this point, you should have no problems making a program to generate a batch of keys for the next 100 customers.

Third step. Now you have a database, so set up some scripts or an application so that you can encrypt a specific file, producing multiple copies, one for each customer ID, encrypted with their key.

Fourth step, write a short simple app that takes a file, decrypts it with a key, then loads and runs the resulting executable file. After the app terminates, delete the decrypted file.

Now the little app that decrypts and runs has to somehow be produced in numerous versions, one for each customer with their key in place. Best way to do that is to generate a random number the same size as the key, and place it as a constant in the code. Then compile it. At this point a tool like grep can find where it is in the executable. Write another small app to read in the decryptor app replace the tag with a real key, and write out a version of the decryptor that you will distribute with the matching decrypted application.

After this, you might want to look at better decryption algorithms than TEA, but don't use something too strong that would run afoul of export laws.

Note that none of this will prevent determined thieves, but it should ward of casual ones and you will learn a lot. Better security can be had with an application that stores critical parts of itself on an encrypted USB key so that there is never a decrypted copy on the hard drive. And remember, any time you think that you have figured out a way to improve the encryption or code protection, you are very likely to be wrong. Much greater minds than ours, have spent their entire lives studying encryption and the general rule is that when you deviate a bit from the accepted algorithms and usages, you end up reducing, not increasing, the security.

林空鹿饮溪 2024-08-14 14:33:06

推出自己的注册和保护程序非常困难,而且通常很容易被破解。尝试看看一些已经做到这一点的廉价商业产品,intellilock 很便宜,我有被发现具有良好的功能(如果没有得到生产它的公司的充分支持,则得到社区的大力支持)。

Rolling your own Registration and protection program is incredibly difficult, and usually very easy to break. Try looking at some of the inexpensive commercial products that already do this, intellilock is cheap and I have found to be well featured (if not well supported by the company that produces it, well supported by the community).

泪意 2024-08-14 14:33:06

如果您保留有效代码的中央存储库,则软件的用户将需要 Internet 连接才能与此存储库通信,以确定他们输入的许可证代码是否有效。该方案还可能存在可扩展性问题。

一种常用的替代方法是从满足某些特定数学关系的数据生成代码,然后验证代码以查看关系是否成立。

基于上述概念的一种非常强大的算法是加密 RSA 算法。

如果您可以使用基于 RSA 的现成许可系统,请查看 CryptoLicensing

If you keep a central repository of valid codes, users of your software would need an Internet connection to communicate with this repository to determine if their entered license code is valid. This scheme may also have scalability issues.

One commonly used alternative method is to generate codes from bye data satisfying some specific mathematical relation, and then validate the code to see if the relations hold.

One very powerful algorithm based on above concept is the cryptographic RSA algorithm.

If you can use a ready-made licensing system based on RSA, check out CryptoLicensing.

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