Topic: How to make restriction for running program on one pc

Hi,
i woul like to sell my program and i want it to be run on 1 pc. Iwant to restric for copy and run on another pc.
Is there a way to do it? giving serial code? demo version of the program stops working after 30 days.

these are the properties what i am looking for. How to do it?

Re: How to make restriction for running program on one pc

Hello,


Here you can download an example, how to make a program stops working after 30 days.

Post's attachments

Attachment icon Trial.zip 3.49 kb, 720 downloads since 2015-01-15 

Dmitry.

Re: How to make restriction for running program on one pc

Its nice but how can i prevent it to run on just for that machine ?
after purchase full version customer can distribute it freely on internet

Re: How to make restriction for running program on one pc

This requires complex protection, which is not supported in current version.


We sell the My Visual Database without such protection, and no one not distribute it freely on internet.

Dmitry.

Re: How to make restriction for running program on one pc

The questions above illustrate the situation for developers who want to distribute their own developed software.

I touched on this type of issues in my Suggestions in the past. Your software needs to be more flexible if you are to be successful in the sale of My Visual Database.

It's Good but not great, developers need the complete package to succeed, same as you do.

Does this mean that I don't have the correct software for the same procedures mentioned above?

The Enginner

Re: How to make restriction for running program on one pc

In the current version there is no simple way, to make strong protection, but you can make almost any protection, using a script, but this requires programming skills.

Dmitry.

Re: How to make restriction for running program on one pc

this is not exactly true, or more correctly, it is true but not very effective.
the reason is that with the current implementation of your scripting ability, it is all visible (and modifiable) as plain text files under the scripts sub-folder.
what is needed, is that the custom scripts be encrypted when stored/written (if kept as separate files), or the custom scripts to be compiled and linked directly into the main executable, so only a single program file is needed to run a developed database application (assuming that it doesn't have any custom reports as well).
even if we try to implement some sort of security or protection into the programs we make, as long as the scripts are unprotected themselves, then it would be easy for them to be reversed engineered to defeat any protection scripts that have been created.

Dennis

Re: How to make restriction for running program on one pc

mr_d
In the folder "Script" you can remove the file "script.pas", the project will work without this file, because in the folder "Script" has compiled version of the "script.pas", which is very difficult to edit (script.dcu).


But the file "script.pas" should be if you want to open the project in My Visual Database.

Dmitry.

9 (edited by mr_d 2015-01-17 12:21:56)

Re: How to make restriction for running program on one pc

i see.  i'm glad i was mistaken about this then; but it is still not a completely robust system; as that script.dcu file can be removed or replaced (if the function names are somehow found/guessed)...may not be very likely, but still possible.  i.e. if the developer uses common function names like encrypt or decrypt or validate or checkpassword etc.

edit: i've just had a look at a script.dcu file and although ir is a bit messy, it is still in plain text (xml format), all the main guts of my custom script code is visible and can easily be extracted from this file.  needs to be properly compiled.

Dennis

Re: How to make restriction for running program on one pc

I think there is no easy way to get the code from the file script.dcu


I agree, it is necessary to develop a reliable mechanism for protection, but at the moment there are more important things to develop.

Dmitry.

Re: How to make restriction for running program on one pc

Would it be possible to make the files invisible or disguised or saved in an external file sorce which can be protected by file locks etc.

All I am saying is there another way around the problem rather than thinking of what should happen.

Re: How to make restriction for running program on one pc

Unfortunately I do not know this method of protection.
I think this method of protection is a good idea for the new program )

Dmitry.

Re: How to make restriction for running program on one pc

I have tried Enigma Protector and it works OK. I feel that their free Virtual Box could provide at least the possibility to pack everything into a single file.

Re: How to make restriction for running program on one pc

Dmitry,

One quick and easy (interim) method (until you come up with a proper solution to this) would be to create a checksum/hash of every custom file created (script, report, etc) and to store these hashes in an internal system table and every time MVD starts, it would interrogate this system table and validate all the files needed.
There is already the MD5 function, so this shouldn't be too hard to implement.

BTW, MD5 is apparently not that secure anymore, so maybe you could add other algorithms like SHA-1 (also apparently not secure any more) or SHA-256, etc.

Cheers, Dennis.

Dennis

Re: How to make restriction for running program on one pc

mr_d
Thank you for the suggestion.

Dmitry.

Re: How to make restriction for running program on one pc

Another way is to provide the user a mechanism to provide you, the license provider, a code that is generated based on their NIC or motherboard sn.  The license key that is provided to the user uses this code value as part of the generated key.  Therefore, if they try to install the software on another machine, the key will not work for that new machine.

Rob

Re: How to make restriction for running program on one pc

would it be possible to restrict the use of an application to a list of users contained in an encrypted table with a message displayed in case of misuse followed by an application closure?

Purpose of the encrypted table is to avoid reading the data using an external Sqlite tool smile

example:

allowed users stored in encrypted Table "MVDB_users"

open application --> check users in "MVDB_users" using sUserName := '"'+GetUserName+'"';


- if user exists = Ok
                                                                                                                                         

- if user does not exist= display warning --> Close application

Another stronger method would be to link the application to the connected network, I do not think it is currently possible...

Re: How to make restriction for running program on one pc

tcoton
In the current version is not possible to avoid reading the data using external tools.


I made example for you, how to encrypt text in database using key (password).
But you can't using search function.

Post's attachments

Attachment icon Employees - Encrypted.zip 155.73 kb, 1042 downloads since 2015-05-28 

Dmitry.

Re: How to make restriction for running program on one pc

Great, this does nearly what I want to do, when you try to read the data using an external tool, the data are not readable; this is what I call preventing read from external source.

The problem is that the encryption password is in clear text in the script file.... big_smile

Is there any chance to encrypt the script file as well in a future version? This would prevent unauthorized people to modify the application as well.

Next step would be to write a script to check if a user is allowed to open the application or not as follow:

Allowed users stored in encrypted Table "MVDB_users"

open application --> check users in "MVDB_users" using sUserName := '"'+GetUserName+'"';


- if user exists = Application open                                                                                                                                         

- if user does not exist= display warning then Close application


Is it possible?

Re: How to make restriction for running program on one pc

tcoton wrote:

Great, this does nearly what I want to do, when you try to read the data using an external tool, the data are not readable; this is what I call preventing read from external source.

The problem is that the encryption password is in clear text in the script file.... big_smile

Is there any chance to encrypt the script file as well in a future version? This would prevent unauthorized people to modify the application as well.


You can remove file script.pas from folder Script, project will use file script.dcu
Also, if you know password, you don't know algorytm without script.pas


tcoton wrote:

Next step would be to write a script to check if a user is allowed to open the application or not as follow:

Allowed users stored in encrypted Table "MVDB_users"

open application --> check users in "MVDB_users" using sUserName := '"'+GetUserName+'"';


- if user exists = Application open                                                                                                                                         

- if user does not exist= display warning then Close application


Is it possible?

Yes, the example for you.

Post's attachments

Attachment icon Employees - Encrypted GetUserName.zip 154.82 kb, 632 downloads since 2015-05-28 

Dmitry.

Re: How to make restriction for running program on one pc

Thanks Dmitry, the weakness is that the password is readable in clear in the script.dcu so it is possible to hack the table using an external tool.

Re: How to make restriction for running program on one pc

Hi Dmitry,

I found a bug using your example with v 1.51: when you add a user with a name containing onth or onh, the "N" transforms into a "L" for some reason!

Post's attachments

Attachment icon N transformed into L.png 46.09 kb, 322 downloads since 2015-05-27 

Re: How to make restriction for running program on one pc

Sorry to bother you but any idea regarding the autotransformation of characters in the DB? My own username is using this combination of letters and I cannot use my application if I use the script.

Re: How to make restriction for running program on one pc

tcoton wrote:

Hi Dmitry,

I found a bug using your example with v 1.51: when you add a user with a name containing onth or onh, the "N" transforms into a "L" for some reason!

Fixed, please download the example again.

Dmitry.

Re: How to make restriction for running program on one pc

Thanks Dmitry,

it works better, even changing the password in the script prevent the program to start but when I add a user, I get a strange behavior: I am asked 3 time to click OK on a window displaying a 5 digits number and the information in the field appears as encrypted until it is saved!

Post's attachments

Attachment icon save_user.png 47.23 kb, 383 downloads since 2015-05-28