Features

Top  Previous  Next

 

Protection method

 

The RubyEncoder 3 protects Ruby scripts by compiling Ruby source code into a bytecode format and this is followed by encryption. This protects your scripts from reverse engineering. Ruby scripts protected by RubyEncoder can be executed but cannot be read and do not contain original source code within encoded files in any form. Scripts protected with RubyEncoder require installation of a RubyEncoder Loader in order to run. The RubyEncoder Loader is a compiled Ruby module which is automatically loaded and used to run protected scripts. RubyEncoder Loaders are binary files that differ for OS and platforms. See the protected scripts loaders section below to know more about RubyEncoder Loaders.  

 

To protect your scripts from unauthorised usage RubyEncoder 3 has added features that can optionally lock your scripts to run only from predefined IP addresses, domain names, LAN hardware addresses (MAC), machine ID. RubyEncoder 3 can also easily produce trial versions of your scripts by setting an expiry date for the script or by limiting the number of days that protected script will work. With RubyEncoder 3 you may optionally lock your scripts so that they require a special license file in order to run. This file may be distributed with the script or separately from it and this option gives you an opportunity to encode your scripts once and distribute to users with different licenses. Each license may have different and specific attributes. The RubyEncoder license generator tool may be used to create a license file directly on your server. This lets you easily provide your customers with a license file for your product in the moment of purchase or downloading of a trial version of your product.

 

 

Protected code

 

This sample Ruby code:

 

puts "Hello World!"  

 

Becomes like this after encoding by RubyEncoder 3:

 

# RubyEncoder v2.7

if !defined?(RGLoader)||!RGLoader.respond_to?(:check_version)||!RGLoader.check_version('2.7') then _d=_d0=File.expand_path(File.dirname(__FILE__)); while true do _f=_d+'/rgloader/loader.rb'; load _f and break if File.exist?(_f); _d1=File.dirname(_d); if _d1==_d then break if defined?(RGLoader); raise LoadError, "Ruby script '"+__FILE__+"' is protected by RubyEncoder and requires a RubyEncoder loader to be installed. Please visit the https://www.rubyencoder.com/loaders/ RubyEncoder web site to download the required loader and unpack it into '"+_d0+"/rgloader/' directory in order to run this protected file."; exit; else _d=_d1; end; end; end; RGLoader_load('AAUAAAAEeAAAAIAAAAAA/9CRIInRdYGFO8QzqDs6IsFobMMMmTvASfFmPSuXukUFstIrnx2/lLKzvHNG1w6DKHDPEg9Zx5BUX09tKczF3aEa0+GPEMkU4LtUb26+crViJfaMMMwUZ3AC2vpA++8bqUgorzhV8hMAl4u6tYk6P+lhz6SvZEt8ZxsAAAAFAAAAaAAAACoZ/kji4TUphCWdUgl3zy4/RdrY8pCK/lnvea1jd9F1FSOXRq2gLO/B1nAAkp8Pg4XrEcVeSgQGFiIhjbM4EJkXILfiY9ebia/M2rClLBxGpmLSP8AXWMBaK112Qo+jkVafNZ//R3ZqAAAAAA==');

 

 

Supported Ruby versions

 

RubyEncoder 3 supports encoding for Ruby 1.8.7, 1.9.x, 2.x. The encoder can encode your Ruby files for multiple versions of Ruby at the same time. When encoding for multiple Ruby versions your Ruby scripts must be compatible with the specified versions of Ruby language. RubyEncoder writes separate bytecodes into the protected script for each version of Ruby. The RubyEncoder Loader will extract and run the required version of bytecode from the protected script during the protected script execution.

 

 

Interface

 

Versions for MacOS, Linux and Windows include a graphical user interface for the encoder and tools. The command line tools are also included.

 

 

Locking

 

To protect your scripts from unauthorised usage RubyEncoder 3 has added some features that can optionally lock your scripts to run only from predefined IP addresses, domain names, LAN hardware addresses (MAC) or machine ID. RubyEncoder 3 can also easily produce trial versions of your scripts by setting an expiry date for the script or by limiting the number of days that the protected script will work. To protect against local date change for trial version of your protected scripts there is an option for time checking with atomic online time servers. With RubyEncoder 3 you may optionally lock your scripts so that they require a special license file in order to run. This file may be distributed with the script or separately from it and this option gives you an opportunity to encode your scripts once and distribute to users with different licenses. Each license may have different and specific attributes. The RubyEncoder license generator tool may be used to create a license file directly on your server. This lets you easily provide your customers with a license file for your product at the precise moment of purchase, or downloading of a trial version, of your product.

 

Here is a sample list of features:

 

locking to date with optional atomic online time servers checking
locking to multiple domain names
locking to multiple IP addresses
locking to multiple LAN hardware (MAC) addresses, also works for CLI scripts
locking to machine ID, also works for CLI scripts
protecting of CLI scripts with remote verification URL
improved locking to a specific domain name with encryption. The domain name is used as a part of the key for encryption, so protected scripts may not be decrypted and run from another domain.
improved locking to the ip address with encryption. The ip address is used as a part of the key for encryption. This means that protected scripts cannot be decrypted and run from another ip address.
improved locking to the machine ID with encryption. The machine ID is used as a part of the key for encryption. This means that protected scripts cannot be decrypted and run from another machine.
locking to an external license file produced by the built-in RubyEncoder 3 license generator. This is ideal for creating protected scripts to be deployed to different users and it even allows to assign different locking options to different users. The RubyEncoder 3 license generator tool can run from GUI or as a command line tool which adds another powerful element - It provides a method for licenses to be dynamically generated and this would be useful (for example) when selling scripts online.
locking protected scripts to work only online

 

 

Other options

 

The following is not an exhaustive list, but covers some of the other options in version 3:

 

Encoding only files changed since last encoding
A custom text may be added as is to the generated license file
Built-in support for GUI versions
option to check the date with online time servers (useful when locking to date is used)
option to assign a custom Ruby code to act as an error handler which will catch errors related to protected script loading or locking
option to set a custom defined constant which may be read later from the protected Ruby code
automatic backup of source files
multiple files processing: enumerated, file mask optionally with directory recursion or file list from the command line
option to exclude some files from encoding process: enumerated or file masks
option to specify an output directory for protected scripts
encoding confirmation when run from the command line
option to include Ruby code to run before a protected script. This is best for including copyright information or for any other advanced needs
option to replace the standard error handler when the appropriate loader is not found. Ruby code can be included here
Please see the change log for further details

 

 

Cross platform

 

Cross platform encoding. A script encoded under one operating system will run under any other supported operating systems. Currently we have a GUI and CLI encoder for Windows, MacOS, Linux, CLI encoder for FreeBSD Script Loaders will run under MacOS, Linux, FreeBSD, MinGW and Windows. Also we have plans to support more operating systems for protected scripts execution.

 

 

Evaluation

 

We provide a Free 14 days evaluation of RubyEncoder 3 Locking options are not available in this free version.