ionCube-protected PHP files can be linked to a license file that enforces various restrictions on how and where the script can be used. These license files are a critical component for developers who distribute the same protected code to multiple users while maintaining control over its usage.
Common License Restrictions
A license file can impose several types of limitations, such as:
-
Expiration Date: Limits script usage to a specific time period.
-
MAC Address Restrictions: Binds the script to specific hardware.
-
Domain Name Restrictions: Limits execution to designated domains.
In addition to these restrictions, license files can also store custom properties and keys that the protected PHP code can access and use during execution.
Why Developers Use License Files
License files allow developers to distribute the same encrypted PHP script to different users while enforcing user-specific restrictions, ensuring that the software is not misused or redistributed illegally.
How License Files Are Encoded
Although a license file may appear as a plain text file, it is encoded. Once decoded, it reveals all the embedded restrictions and associated data. However, decoding a license file is not straightforward.
The License Decoding Process
To decode a license file, the following general approach is used:
-
Extract Shared Data: First, extract specific data from one of the ionCube-encoded PHP files that is bound to the license file. This data remains consistent across all encoded files within the same script and can help speed up the decoding process.
-
Reverse the Loader Procedure: The decoding method can be derived by reversing the ionCube loader binaries — essentially understanding how the loader reads and validates the license file.
-
Create a Custom License File: By following the reverse-engineered procedure, it is possible to generate a new license file compatible with the specific encoded PHP files.