BLACKFIRE69
30-08-2024, 04:40
ISCompilerEx.dll Documentation
Overview
ISCompilerEx.dll is a versatile plugin designed to enhance the capabilities of InnoSetup by allowing script compilation from both local script files and encrypted resources embedded within the DLL. The latest update introduces support for encrypted code snippets, enabling you to securely share your scripts while protecting specific portions of the code.
Key Features
- Compile Local Scripts: Compile scripts directly from local files.
- Compile Encrypted Embedded Scripts: Compile scripts embedded as encrypted resources within the DLL.
- Script Protection: Scripts added to the ISCompilerEx.dll resource are encrypted internally, making extraction impossible. This feature turns ISCompilerEx.dll into a script protector.
- Encrypted Code Snippets: Securely encrypt parts of your script to protect sensitive code, allowing you to share your script with others while keeping critical code snippets hidden.
Script Compilation Examples
1. Compile Encrypted Embedded Scripts: 'Compile_Sample1_Res.iss' & 'Compile_Sample2_Res.iss'
These scripts demonstrate how to compile scripts like 'Sample1.iss' and 'Sample2.iss' from resources embedded in the DLL.
Step 1: Add these sample scripts to the ISCompilerEx.dll resource using 'ResourcePacker.exe'.
Note: The scripts are automatically encrypted when added to the DLL resource, ensuring they cannot be extracted or tampered with.
Step 2: Assign any name to the 'ResourceName' in 'ResourcePacker.exe'.
Make sure to update this name in the 'ResourceName' field within the 'Compile_Sample_Res.iss' script.
For this example, 'SCRIPT_01' and 'SCRIPT_02' are used as the 'ResourceName' for the sample scripts.
2. Compile Local Scripts: 'Compile_Sample2_Local.iss'
This script demonstrates how to compile a local script using ISCompilerEx.dll.
3. Encrypted Code Snippets: 'Sample2.iss'
The updated ISCompilerEx.dll supports encrypted code snippets within your scripts, allowing you to encrypt specific sections of your code while leaving the rest in plain text.
Step 1: Use 'CodeEncryptor.exe' to create encrypted code snippets.
Step 2: Ensure that the encrypted code is enclosed within the following comments:
"
{Seal:0xAE}
<encrypted_code>
{Seal:0x3C}
"
Example of Encrypted Script
Below is an example of a script with partially encrypted code:
[Setup]
AppName={#NameX}
AppVersion={#VerX}
WizardStyle=modern
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=lzma2
SolidCompression=yes
OutputDir=.\Output
OutputBaseFilename={#OutfileX}
{Code]
{Seal:0xAE}
dNQkg8LpNjyBfU48X3DyUR3Pkcco+bgcibpIhMi4t07ZbR3MEM 0TxEvARUAEUwGMbf92vxg6D7SxG6wCOVCf/up8oth+UgUqCiovrhf4pO/XFVVHzOw88Fq4GCLutcCelFyyyS45OtjfawgHkVh1eiZqjKS/+A==
e9JIccRqtvsXNUbnhRIA6syn/Pg3WnIcxjfx0feZu4tspf+oRVz6FcBOaeMgAi6/qepD2uqFotB0eqfFX2AJHtWb4IvRpLaZJpAq1c9bhEeqhQM9+Y aLWA==
d9O5cMHfzl5barXk4UaLF/1u+zJOX+wgoBaoYG2Wft8O3ng8j50lkyCzhTA=
d9O75uq6+3Q=
{Seal:0x3C}
function InitializeSetup(): Boolean;
begin
Result := True;
end;
{Seal:0xAE}
YmiFZJblBzwT2nkmEC7l0s0pQjE7KHb6iD607yxgrZT5VFozkH oJQkJTCwfABfSpVzwAvQsAxGD2H/6Jl4oQQw==
W4vBRBylP7NLEi2viMA1zD06IbMZrvSvVB2aLCPKVRV60yd3vS mVxddaeUxGBj7K8N+jtUnbtc/JqS1iBzC9F5lp5q9Os2YTZoG8HLPbjOpwUFxpeTCeOg==
cAe/VFx74XUPxKDd5B944KbmMB8GbUDDOq+oUunlw66rN+IUwUtg0K T6EXVQqvc8gyCnjw==
QsMs+NzGetgL1QTYcdMeEUUldC8tm2+p5bMmApBPBtNrVUSmcx WkhxPZDnIvtGwXD/jZgPPNV4K4565O+w8T/bEt7aaVsWszxNRV1cWqJ9sTxsIQ7asMFJgTbRKo0AiPkmEdmZd/3XNM7guoT2Q4ET9VxtmUPRtDGKm3WvO6k+WapZSor75ni9yV4D KDJ3nPPqe2q9n4C3GZfK2aUFAGeUwUPm02/yJQOn7eMk/htddH3ch/x1S9ozFT7uaJNygfohiXtuY6cf0gFpjKTDHTsA==
QsMs+NzGetgL1QTYcdMeEUUldC8tm2+p5bM3MQTn9iv4VVwT/IVURnH6asIIWJ5xkTVHbMSW5R1qmDBObT/z8ukrOW+iHJpqgzQALnTNStcI1Gx/eazeIqfnzDcWEqVE
{Seal:0x3C}
Corresponding Original Code
Here is the original code corresponding to the encrypted snippets above:
[Setup]
AppName={#NameX}
AppVersion={#VerX}
WizardStyle=modern
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=lzma2
SolidCompression=yes
OutputDir=.\Output
OutputBaseFilename={#OutfileX}
{Code]
function CheckNumberParity(Number: Integer): String;
begin
if (Number mod 2 = 0) then
Result := 'even'
else
Result := 'odd';
end;
function InitializeSetup(): Boolean;
begin
Result := True;
end;
procedure InitializeWizard;
var
InputNumber: Integer;
ParityResult: String;
begin
InputNumber := 147;
ParityResult := CheckNumberParity(InputNumber);
MsgBox('The number ' + IntToStr(InputNumber) + ' is ' +
ParityResult + '.', mbInformation, MB_OK);
end;
Note:
- The code surrounded by '{Seal:0xAE}' and '{Seal:0x3C}' is encrypted to protect sensitive logic while sharing scripts.
.
Overview
ISCompilerEx.dll is a versatile plugin designed to enhance the capabilities of InnoSetup by allowing script compilation from both local script files and encrypted resources embedded within the DLL. The latest update introduces support for encrypted code snippets, enabling you to securely share your scripts while protecting specific portions of the code.
Key Features
- Compile Local Scripts: Compile scripts directly from local files.
- Compile Encrypted Embedded Scripts: Compile scripts embedded as encrypted resources within the DLL.
- Script Protection: Scripts added to the ISCompilerEx.dll resource are encrypted internally, making extraction impossible. This feature turns ISCompilerEx.dll into a script protector.
- Encrypted Code Snippets: Securely encrypt parts of your script to protect sensitive code, allowing you to share your script with others while keeping critical code snippets hidden.
Script Compilation Examples
1. Compile Encrypted Embedded Scripts: 'Compile_Sample1_Res.iss' & 'Compile_Sample2_Res.iss'
These scripts demonstrate how to compile scripts like 'Sample1.iss' and 'Sample2.iss' from resources embedded in the DLL.
Step 1: Add these sample scripts to the ISCompilerEx.dll resource using 'ResourcePacker.exe'.
Note: The scripts are automatically encrypted when added to the DLL resource, ensuring they cannot be extracted or tampered with.
Step 2: Assign any name to the 'ResourceName' in 'ResourcePacker.exe'.
Make sure to update this name in the 'ResourceName' field within the 'Compile_Sample_Res.iss' script.
For this example, 'SCRIPT_01' and 'SCRIPT_02' are used as the 'ResourceName' for the sample scripts.
2. Compile Local Scripts: 'Compile_Sample2_Local.iss'
This script demonstrates how to compile a local script using ISCompilerEx.dll.
3. Encrypted Code Snippets: 'Sample2.iss'
The updated ISCompilerEx.dll supports encrypted code snippets within your scripts, allowing you to encrypt specific sections of your code while leaving the rest in plain text.
Step 1: Use 'CodeEncryptor.exe' to create encrypted code snippets.
Step 2: Ensure that the encrypted code is enclosed within the following comments:
"
{Seal:0xAE}
<encrypted_code>
{Seal:0x3C}
"
Example of Encrypted Script
Below is an example of a script with partially encrypted code:
[Setup]
AppName={#NameX}
AppVersion={#VerX}
WizardStyle=modern
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=lzma2
SolidCompression=yes
OutputDir=.\Output
OutputBaseFilename={#OutfileX}
{Code]
{Seal:0xAE}
dNQkg8LpNjyBfU48X3DyUR3Pkcco+bgcibpIhMi4t07ZbR3MEM 0TxEvARUAEUwGMbf92vxg6D7SxG6wCOVCf/up8oth+UgUqCiovrhf4pO/XFVVHzOw88Fq4GCLutcCelFyyyS45OtjfawgHkVh1eiZqjKS/+A==
e9JIccRqtvsXNUbnhRIA6syn/Pg3WnIcxjfx0feZu4tspf+oRVz6FcBOaeMgAi6/qepD2uqFotB0eqfFX2AJHtWb4IvRpLaZJpAq1c9bhEeqhQM9+Y aLWA==
d9O5cMHfzl5barXk4UaLF/1u+zJOX+wgoBaoYG2Wft8O3ng8j50lkyCzhTA=
d9O75uq6+3Q=
{Seal:0x3C}
function InitializeSetup(): Boolean;
begin
Result := True;
end;
{Seal:0xAE}
YmiFZJblBzwT2nkmEC7l0s0pQjE7KHb6iD607yxgrZT5VFozkH oJQkJTCwfABfSpVzwAvQsAxGD2H/6Jl4oQQw==
W4vBRBylP7NLEi2viMA1zD06IbMZrvSvVB2aLCPKVRV60yd3vS mVxddaeUxGBj7K8N+jtUnbtc/JqS1iBzC9F5lp5q9Os2YTZoG8HLPbjOpwUFxpeTCeOg==
cAe/VFx74XUPxKDd5B944KbmMB8GbUDDOq+oUunlw66rN+IUwUtg0K T6EXVQqvc8gyCnjw==
QsMs+NzGetgL1QTYcdMeEUUldC8tm2+p5bMmApBPBtNrVUSmcx WkhxPZDnIvtGwXD/jZgPPNV4K4565O+w8T/bEt7aaVsWszxNRV1cWqJ9sTxsIQ7asMFJgTbRKo0AiPkmEdmZd/3XNM7guoT2Q4ET9VxtmUPRtDGKm3WvO6k+WapZSor75ni9yV4D KDJ3nPPqe2q9n4C3GZfK2aUFAGeUwUPm02/yJQOn7eMk/htddH3ch/x1S9ozFT7uaJNygfohiXtuY6cf0gFpjKTDHTsA==
QsMs+NzGetgL1QTYcdMeEUUldC8tm2+p5bM3MQTn9iv4VVwT/IVURnH6asIIWJ5xkTVHbMSW5R1qmDBObT/z8ukrOW+iHJpqgzQALnTNStcI1Gx/eazeIqfnzDcWEqVE
{Seal:0x3C}
Corresponding Original Code
Here is the original code corresponding to the encrypted snippets above:
[Setup]
AppName={#NameX}
AppVersion={#VerX}
WizardStyle=modern
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
Compression=lzma2
SolidCompression=yes
OutputDir=.\Output
OutputBaseFilename={#OutfileX}
{Code]
function CheckNumberParity(Number: Integer): String;
begin
if (Number mod 2 = 0) then
Result := 'even'
else
Result := 'odd';
end;
function InitializeSetup(): Boolean;
begin
Result := True;
end;
procedure InitializeWizard;
var
InputNumber: Integer;
ParityResult: String;
begin
InputNumber := 147;
ParityResult := CheckNumberParity(InputNumber);
MsgBox('The number ' + IntToStr(InputNumber) + ' is ' +
ParityResult + '.', mbInformation, MB_OK);
end;
Note:
- The code surrounded by '{Seal:0xAE}' and '{Seal:0x3C}' is encrypted to protect sensitive logic while sharing scripts.
.