Restricting a program to run on unauthorised machines

Restricting a program to run on unauthorised machines

Bild des Benutzers osrondon

Hi,

Can you please advice what compiler option(s) (if any) I should use to avoid a Fortran program to run on non authorised machines?

Thanks

7 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers onkelhotte

AFAIK there is no compiler option that does that for you.

We secured our programs by getting hardware information at runtime. That hardware information is hard coded in our program and compared at the beginning of the program. In case of a mismatch the program won´t start.

Markus

Bild des Benutzers Neels

I use PLS from Polyhedron and it has various options, one of them using hardware id values to license the software. It works great!

Neels

Bild des Benutzers osrondon

Thanks.

I am after something simple but that works. Markus, can you provide me with some code example(s) I can follow?

Bild des Benutzers onkelhotte

Well, you could do the following things:


character*255 username,hostname

call GETENV ("USERNAME", userName)

l = Hostnam(hostname)

These two functions get you the name of the computer and the logged in user. You can do some Registry stuff via Win32, like RegOpenKeyEx and RegQueryValueEx.

Bild des Benutzers Andrew Smith

It is not a simple matter to license software. The more valuable your software, the more effort people will make to crack it and the more it will cost you to pretect it. For instance, if you embed hardware ID in your code, it will be a fairly simple matter to ovewrite your executable with any other ID, especially if you tell people that is how your software works ! You would need to employ encrytion to stop tampering. If you really want to protect the value of your software you should employ a good comercial system. Intel Fortran itself uses the Flex system I believe, but there are many others such as Safenet.

Bild des Benutzers osrondon

Markus,

Thanks for the example.

Neels and Andrew thanks for your valuable comments.

Melden Sie sich an, um einen Kommentar zu hinterlassen.