rschupp / PAR-Packer

(perl) Generate stand-alone executables, perl scripts and PAR files https://metacpan.org/pod/PAR::Packer
Other
50 stars 13 forks source link

[Question] Hash value of exe in par- #90

Closed TakamotoAI closed 3 months ago

TakamotoAI commented 3 months ago

Hello,

more and more companies do not allow any exe to be run (besides the installed ones). PAR pp unpack a exe in the TEMP folder (or in any other specified region) and starts the main application from there, falling in the category of not allowed actions.

One option I am given is to confirm that this exe remains stables across users/time, so that an hash value can be computed and special allowence can be given to exe with that hash. While subobtimal, this could be a solution. I did not find any info about the nature of this exe (when it is created, what it contains, etc.), so I am asking here if you can point me to info about this exe and/or confirm that the file remains stable. Some preliminary tests I have done seem to confirm this.

One other option is that I create an installer of the unpacked par- structure and start the application directly from the exe inside the par- directory. Is this at all possible? Double clicking the exe in par- does not start the application.

Thank you in advance

rschupp commented 3 months ago

One option I am given is to confirm that this exe remains stables across users/time, so that an hash value can be computed and special allowence can be given to exe with that hash. While subobtimal, this could be a solution. I did not find any info about the nature of this exe (when it is created, what it contains, etc.), so I am asking here if you can point me to info about this exe and/or confirm that the file remains stable.

The executable is created when you build PAR::Packer and installed (in uuencoded form) as .../PAR/StrippedPARL/Dynamic.pm. It will only change when you rebuild PAR::Packer (either to upgrade it or after your perl installation has been upgraded to a new major version, e.g. 5.38 → 5.40).

Note: If you pack with pp --gui ... this will use a different (but also stable) executable - the "normal" one with just one byte changed.

One other option is that I create an installer of the unpacked par- structure and start the application directly from the exe inside the par- directory. Is this at all possible?

No. If you want to go the installer route, PAR::Packer is the wrong tool.

TakamotoAI commented 3 months ago

Thank you very much. This gives me a good overview.