Script license generator (full version) |
Top Previous Next |
The Script License Generator is an external tool for creating script license files. A script license file is required to run protected scripts encoded with the --external option. You may find 'licgen' executable in the RubyEncoder installation directory in /bin subdirectory. Running the license generator without any options prints a list of all available options for a quick help. Please refer to this user manual for details of using the license generator.
Using the script license is the best way of encoding if you need to distribute one script or entire project between different users but need to use different restriction options for each user. You need to encode your scripts with the --external option using RubyEncoder 3 and then create a license for each user with the RubyEncoder 3 Script License Generator.
Scripts encoded with the --external option require an external license file to run. Protected scripts will search for the license file in the current directory and all parent directories. So you may have one license file for an entire protected project located in the top project directory.
If a protected script cannot find the specified license file it will return an error message: "RubyEncoder Loader - the script requires ... license file to run. Contact the script author regarding getting a license file. Error code [13]"
The algorithm used for locking scripts to an external license file gives your scripts much stronger protection from reverse engineering, unlocking and bytecode stealing, but it also gives you the most flexible way to generate trial versions of your products and to lock scripts to your customer's machine. This is the most powerful and flexible way to protect your scripts. We recommend that you use external license files for all your script protection.
A brief description of the algorithm
The algorithm uses an idea of two keys. The first key (Project Id) is stored in the encrypted area of the protected script and is used to decrypt an external license file. The second key (Project Key) is stored in the license file and it is used to decrypt the bytecode from the protected script.
Using this algorithm the encoder protects your product by preventing a full working copy from being created from, for example, a demo version. To decrypt and run a protected script a true license file for the full version of your product is required. Otherwise it's impossible to decrypt and run the bytecode.
Project Id and Project Key values are required if the external license protection method is chosen.
You should specify Project Id (--projid) and Project Key (--projkey) values using options in the command line for "rubyencoder" commands. Project Id and Project Key may be any words, numbers or random sequence but for security reasons these two values *should not* be calculated from each other. They should be independent. Also you should specify the *same* Project Id, Project Key pair for "licgen" command when generating a license for previously protected scripts.
Command line example:
>rubyencoder --external script.lic --projid "82Gi17Bn" --projkey "Az973Qq9" myscript.rb >licgen --projid "82Gi17Bn" --projkey "Az973Qq9" --days 7 script.lic
If you have licenses for multiple RubyEncoder installations you may encode scripts on one machine and generate license files on another machine. The only requirement is to use the same Project Id and Project Key values for your project on different machines.
If a script is run with an incorrect license file the following error message appears: "RubyEncoder Loader - a license file required to run this protected script is invalid. Contact the script author regarding getting a license file. Error code [06]"
If a script is run with a license file with the correct Project Id but incorrect Project Key (this may be a cracking attempt or accidental modification of the license file or script) the following error message appears: "RubyEncoder Loader - Loader - script checksum error. The encoded file has been modified. If the script requires a license file to run this error may be caused by invalid license file. Install original unmodified file or contact the script author regarding getting the original file or license file. Error code [12]"
Important Security Notice!
( ! ) Keep your Project Id and Project Key values in a secret.
( ! ) Remember your Project Id and Project Key. It's impossible to restore the values if forgotten. They are required for generating licenses for your customers.
( ! ) When generating the Project Id and Project Key manually, please use different values for Project Id and Project Key.
|