Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi: 30-day trial

Tags:

delphi

How can I make a 30-day trial for my application? I need to allow users to use an application only 30 days. How to count these days?

I keep the first and the last date in registry. But if to change a system time - no protection will be. I need to count these 30 days.

like image 726
maxfax Avatar asked Aug 02 '11 17:08

maxfax


People also ask

Is there a free version of Delphi?

All the features of the Professional version of Delphi software available with a free license if you have your own or a dedicated PC. You install a ​named license​ after you register online. Keep in mind that there are restrictions on the use of this license.

Is Delphi 11 free?

Delphi CE is shared free of charge with our community of freelance developers, startups, students and non-profits.

Who still uses Delphi?

You'll find Delphi applications in healthcare, banking, fintech, and many other industries. Delphi applications written ten or more years ago still run reliably, and can be updated and modernized where needed.

Is RAD Studio Community Edition free?

Download the Free Delphi: Community Edition - Embarcadero. RAD Studio RAD Studio® is the ultimate IDE for building multi-platform high-performance native applications in Delphi® and modern C++ with powerful visual design tools and integrated toolchains.


2 Answers

You could probably come up with a system that requires an internet connection, but without something that the user can't tamper with, I don't see a solution.

Any solutions that rely on an untrusted element (an element of the protection that is under the user's control) is critically weak.

The simplest way I can think of to protect against the user moving the clock back is to limit the total number of launches.

However, attempts to limit the number of launches requires persistence -- saving data to the disk, perhaps encrypting and storing a modified version of your activation data file -

Imagine that you count one of the 30 days as "used up" once the app has been launched, on a unique occasion, even when the same date is re-used. In order to avoid using up more than 1 "activation time day" when launched, the user must allow your software to re-save its activation file each time it runs.

To block that approach, the user needs only to keep the apparent date from changing, plus they must either prevent you from storing anything to disk; or they can simply track and record your changes and reverse them out, either using a monitoring process, or using VMWare snapshots. About VMWare snapshots, you can do nothing. The virtual machine's disk is not under your control.

like image 106
Warren P Avatar answered Sep 22 '22 10:09

Warren P


You can protect your app of users setting the clock back simply by storing in the registry the date of last execution.

Each time the app is started you need to do the following:

  • Check current date (as reported by the system clock) against the stored last execution date and, if current date is earlier than the last execution one, consider that the trial period has expired (or whatever you prefer).
  • If the previous check is ok, save the current date in the registry and continue execution.

As WarrenP says, any technique storing information locally can be easily circumvented using VMware snapshots.

And anyone, including those who check via internet, can be skipped via assembler level hacking.

like image 28
JRL Avatar answered Sep 25 '22 10:09

JRL