需要一种按小时许可应用程序的方法

发布于 2024-10-12 20:44:35 字数 383 浏览 4 评论 0原文

我想获得我们的一款(Windows 桌面或服务器)应用程序的许可,以便可以(使用预付费密钥)使用特定的小时数。应该可以停止和重新启动,并且运行周期由用户选择。时间不需要记录到秒,分钟即可;尽管它需要由技术能力强的用户来证明其不会受到欺诈,但它不需要抵御政府机构级别的攻击!该应用程序可以保持安装状态(只是阻止使用),直到用户稍后购买另一个密钥。 “关键” 必须只是软件,加密狗不适合此应用程序。

理想情况下,我想要一些关于如何在我们自己的 Delphi (XE) 代码中安全地实现这一点的想法,但它同样可以在任何语言的单独应用程序中完成,并且我们可以只要求该应用程序在我们的应用程序运行时运行。我愿意购买一个组件来实现这一点,但我不想花大钱购买一个许可工具,它的功能远不止这个要求。我们已经有了一个许可机制,可以防止在特定日期之后使用。

I would like to license one of our (Windows desktop or sever) applications so that it can be used (with a pre-paid key) for a specific number of hours. It should be possible for it to be stopped and restarted and the periods of running chosen by the user. The time does not need to be recorded to the second, minutes would be fine; and though it needs to be proof against fraud by a technically competent user, it does not need to resist attack at the level of government agencies! The app can remain installed (just prevented from being used) until the user later purchases another key. The 'key'
must be software only, dongles are not appropriate for this application.

Ideally I would like some ideas about how to implement this securely in our own Delphi (XE) code, but it could equally be done in a separate application in any language, and we could just require that app to be running whenever ours is. I am open to purchasing a component to implement this, but I do not want to pay big money for a licencing tool that does a whole lot more than just this requirement. We already have a license mechanism that can prevent use after a specific date.

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

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

发布评论

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

评论(4

伪心 2024-10-19 20:44:35

我建议您查看 Oreans 的 WinLicense:http://www.oreans.com/winlicense.php

他们的试用许可正是您想要做的。您可以轻松地将许可证设置为在这么多累积分钟数后过期。

Winlicense 可以轻松集成到 Delphi 中,并具有众多配置选项。我在过去的一年里一直在使用它,并且对该软件及其支持非常满意。

替代文本

I suggest you look into WinLicense from Oreans: http://www.oreans.com/winlicense.php

Their trial licensing does exactly what you want to do. You can easily set a license to expire after so many cumulative minutes.

Winlicense integrates easily into Delphi and has numerous configuration options. I've been using it for the past year and have been very happy with the software and their support.

alt text

辞旧 2024-10-19 20:44:35

当用户购买几个小时的使用时间时,您可以为用户提供一个(唯一的)许可证密钥,并将该密钥与金额一起存储在您自己的网络服务器 licensing.yourdomain.com 上到目前为止购买的小时数和花费的分钟数(所谓的“分钟计数器”)(即 0)。现在,在应用程序中,有一个通过 TTimer 运行的函数 CheckLicensed: boolean,例如每分钟运行一次。这会向 licensing.yourdomain.com 发出轻量级 POST 请求,并发送许可证密钥。然后服务器将分钟计数器加一。如果分钟计数器小于购买的分钟数,则函数 CheckLicensed 返回 true。另一方面,如果许可证已过期,它将返回 false,您可以禁用功能甚至终止应用程序(当然取决于应用程序的性质)。

当然,当应用程序不运行时,分钟计数器不会增加,因此许可证不会被浪费。另外,您也许可以为用户提供暂停 TTimer 的选项,但是当然,这也会禁用程序中的一些按钮(视情况而定)。

这种方法需要持续访问互联网,但这对您来说可能不是问题。这是非常安全的。例如,最终用户不能通过更改系统时间或更改分钟计数器来作弊(因为它驻留在您的服务器上,并且只有(美国)政府机构可以访问该服务器)。

如何发送POST请求?我之前已经在 如何使用 WinInet 在 Delphi 2010 中发送 HTTP Post 请求

When the user buys a few hours of use, you could give the user a (unique) license key, and also store this key on your own web server, licensing.yourdomain.com, together with the amount of hours purchased and the number of minutes spent (the so-called "minute counter") so far (that is, 0). Now, in the application, there is a function CheckLicensed: boolean that is run, by means of a TTimer, for instance, once a minute. This makes a light-weight POST request to licensing.yourdomain.com, sending the license key. The server then increases the minute counter by one. If the minute counter is less then the number of minutes purchased, the function CheckLicensed returns true. If the license has expired, on the other hand, it returns false, and you can disable features or even terminate the application (depending - of course - on the nature of the application).

Of course, when the application is not running, the minute counter will not be increased, and so the license will not be wasted. Also, you might be able to give the user an option to pause the TTimer, but of course, this would also disable a few buttons (as appropriate) in the program.

This approach requires constant Internet access, but that might not be a problem for you. It is very safe. For instance, the end user cannot cheat by changing his system time, or altering the minute counter (since it resides on your server, and only a (US) government agency could access that one).

How to send a POST request? I have given an answer to that question previously at How to send a HTTP Post Request in Delphi 2010 using WinInet

天煞孤星 2024-10-19 20:44:35

拥有可从您的电子商务商店调用的 Web 服务,该服务根据以下条件生成密钥:
用户名 + 电子邮件 + 日期时间 + 购买时间
使用简单的算法,例如使用 AES256 加密该字符串。

在您的应用程序中,他们会输入自己的姓名和电子邮件。然后他们粘贴从电子商务商店收到的密钥。现在您知道他们何时购买以及购买了多少小时。如果购买日期/时间是最近的(在过去 30 分钟内?),请解锁应用程序并启动时钟。您需要自己跟踪时间,将其存储在安全的地方,最好是加密或隐藏。

Have a web service callable from your e-commerce store that generates a key based on:
UserName + Email + DateTime + NumHoursPurchased
Use a simple algorithm such as encrypting that string with AES256.

In your app, they'd enter their name, and e-mail. Then they'd paste in the key that they receive from the e-commerce store. Now you know when they purchased it, and how many hours. If the purchase date/time is recent (within the past 30 min?), unlock the app and start your clock. You'll need to track the time yourself, store it somewhere safe, ideally encrypted or obscured.

桃扇骨 2024-10-19 20:44:35

我建议使用基于犰狳保护引擎构建的 Software Passport。多年来它对我很有帮助。

在某个阶段,您需要一个犰狳专业许可证才能创建证书,从中可以创建在 x 分钟内过期的密钥,但我认为随着 Software Passport(犰狳曾经是单独的产品)的出现,它已经成为标准,虽然该网站对此不是很清楚。

由于软件通行证来自 Digital River,因此另一个优势是可以轻松与所有 Digital River 支持的软件门户网站集成,作为您的“购物车”。

如果我正确理解它们(没有使用过),另一个优点是您可以使用称为自动密钥传递的东西,在这种情况下,软件周围的安全信封会联系数字河流服务器,并且它们的密钥会直接传递到您的软件中。这意味着用户永远不会看到实际的密钥...(非常方便地防止最终用户复制密钥)。

作者:http://www.siliconrealms.com/

I would suggest Software Passport which is built on Armadillo protection engine. It has served me very well for several years.

At one stage you needed an Armadillo pro license to be able to create certificates from which keys can be created that expire by x minutes, but I think that with the advent of Software Passport (Armadillo used to be separate product), it comes standard, though the site isn't very clear about it.

As Software passport is from Digital River, an added advantage is the easy integration with all digital river backed software portal sites as your "shopping cart".

Another advantage, if I understand them correctly (haven't used it), is that you can use something called automatic key delivery in which case the security envelope wrapped around your software contacts the digital river servers and they key is delivered straight into your software. Meaning the user never gets to see the actual key... (pretty handy to prevent key copying by your end users).

Authors: http://www.siliconrealms.com/

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