如何生成c程序的激活码?
我想向客户出售一个程序,但我想让一个程序可以在一台服务器上运行,只需一个许可证代码,如果客户想在其他服务器上运行该程序,他需要购买更多的激活码。
那么有没有好的方法来生成激活码呢?我想这将与一个密码和服务器 MAC 地址相关 顺便
说一句:我只需要一种简单的方法,因为我的客户不是技术人员
i want to sell one program to customer, but I want to make one program can run at one server with only one lisence code, if customer want to run the program at other servers, he needs to buy more activation codes.
so is there a good method to generate activation code? i imagine that it will be related with one password and server mac-address
BTW: I just need one easy method, because my customer is not technology man
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我可以给你一个粗略的想法,但这并不容易。
让服务器运行,并在程序开始时,让它使用激活码和生成的哈希码(对于程序的每次编译都是唯一的)查询服务器,并让服务器检查是否已查询该组合前。
I can give you a rough idea, but, it isn't very easy.
Have a server running, and, at the start of your program, make it query your server with an activation code and a generated hash code (that is unique to each compile of the program) and have your server check if the combination has been queried before.
对于[产品激活][2],有成熟的解决方案,它们已经解决了您需要考虑的问题,包括:
....还有更多。
There are well-established solutions for [product activation][2], and they already deal with the issues you need to think about, including:
....and much more.
没有完美的方法可以做到这一点,因为虚拟化基本上可以模拟任何环境,达到令人惊叹的细节。许可证文件、签名的可执行文件和远程许可证服务器都是选项,但对您的客户来说却是一种压力。我建议您与客户签订许可协议并信任他们。您没有理由不能采用某种定期审核,但最终这取决于信任与便利的问题。
There is no perfect way to do this since virtualization can basically emulate any environment to amazing detail. License files, signed executables, and remote license servers are all options but are such a strain on your customer. I recommend you form a license agreement with your customer and trust them. There is no reason that you couldn't adopt some sort of periodic audit but in the end it comes down to a matter of trust vs convenience.