--- AllPagesExample.iss.old 2020-12-19 22:13:15.844179600 +0100
+++ AllPagesExample.iss.new 2020-12-19 22:12:46.413226600 +0100
@@ -18,6 +18,7 @@
LicenseFile=license.txt
#define Password 'password'
Password={#Password}
+Encryption=yes
InfoBeforeFile=readme.txt
UserInfoPage=yes
PrivilegesRequired=lowest
Quote from: Markus on December 19, 2020, 06:30:15 PMThat is not entirely unexpected - as I wrote in the readme, I don't have a single protected installer to try it on.
The Innounp-mod package is not able to decrypt setup *.exe files which were protected by a password.
QuoteI looked at the source code and found the two code fragments which needs to be patched in order to allow decryption. They patches are attached in diff format:Thanks. However, what would help the most, would be a demonstration installer which I could use for tests.
Quote--- ArcFour.pas.old 2018-12-25 10:26:04.946166300 +0100
+++ ArcFour.pas.new 2020-12-19 18:09:52.307024800 +0100
@@ -62,7 +62,8 @@
procedure ArcFourCrypt(var Context: TArcFourContext; const InBuffer;
var OutBuffer; Length: Cardinal);
var
- i, tmp: byte;
+ i: Cardinal;
+ tmp: byte;
InBuf, OutBuf: ^byte;
begin
InBuf := @InBuffer;
This is definitely a thing to fix.QuoteI don't think this has any influence at all. The result is exactly the same in both versions.--- Observer.pas.old 2020-04-13 10:14:54.222916600 +0200
+++ Observer.pas.new 2020-12-19 18:09:55.203788000 +0100
@@ -261,7 +261,8 @@
{$IFDEF LOG} Log('- Detination filename: %s', [string(Params.DestPath)]); {$ENDIF}
Inno := TInnoSetupFileEx(Handle);
Inno.SetCallbacks(Params.Callbacks);
- Inno.Password := {$IFDEF UNICODE} string {$ENDIF} (AnsiString(Params.Password));
+ if (Params.Password <> '') then
+ Inno.Password := {$IFDEF UNICODE} string {$ENDIF} (AnsiString(Params.Password));
if (Params.ItemIndex < 0) or (Params.ItemIndex >= Inno.FileCount) then begin
{$IFDEF LOG} Log('- No more files'); {$ENDIF}
Result := SER_ERROR_READ;
--- ArcFour.pas.old 2018-12-25 10:26:04.946166300 +0100
+++ ArcFour.pas.new 2020-12-19 18:09:52.307024800 +0100
@@ -62,7 +62,8 @@
procedure ArcFourCrypt(var Context: TArcFourContext; const InBuffer;
var OutBuffer; Length: Cardinal);
var
- i, tmp: byte;
+ i: Cardinal;
+ tmp: byte;
InBuf, OutBuf: ^byte;
begin
InBuf := @InBuffer;
--- Observer.pas.old 2020-04-13 10:14:54.222916600 +0200
+++ Observer.pas.new 2020-12-19 18:09:55.203788000 +0100
@@ -261,7 +261,8 @@
{$IFDEF LOG} Log('- Detination filename: %s', [string(Params.DestPath)]); {$ENDIF}
Inno := TInnoSetupFileEx(Handle);
Inno.SetCallbacks(Params.Callbacks);
- Inno.Password := {$IFDEF UNICODE} string {$ENDIF} (AnsiString(Params.Password));
+ if (Params.Password <> '') then
+ Inno.Password := {$IFDEF UNICODE} string {$ENDIF} (AnsiString(Params.Password));
if (Params.ItemIndex < 0) or (Params.ItemIndex >= Inno.FileCount) then begin
{$IFDEF LOG} Log('- No more files'); {$ENDIF}
Result := SER_ERROR_READ;