gautam has asked for the wisdom of the Perl Monks concerning the following question:

Greetings monks,

I'm looking for a way to add text to the message area of a PAR generated exe without messing up the structure of the exe. I want to be able to add the text after the exe is created, i.e. generate the exe using the pp command, and then inject the text into the exe using another perl script.

Is this possible? What modules could I use?

Any help would be appreciated

  • Comment on Can I add text to a message area in an EXE file?

Replies are listed 'Best First'.
Re: Can I add text to a message area in an EXE file?
by davidrw (Prior) on Apr 12, 2006 at 13:10 UTC
    what about having the program read in a text file instead? or read from a config (AppConfig or any of the other Config modules), or from the registry (Win32::Registry) even? You can leave the default text in the exe in the case that the external text source doesn't exist.
      Hey, thanks for the reply!

      I'm trying to avoid Config Files/ Registry for security reasons. I am looking to store passwords in the exe, post exe creation. Do you think this is possible?

        possible? maybe, i don't know .. but if security is your concern, you _really_ don't want to do that .. If you can read the passwords out to replace them, then obviously anyone can read them. They'd probably pop right up if the exe was run through the standard *nix strings utility.

        Also, wherever you store them, be sure to not store plain text passwords -- use Digest::MD5 or some other hashing techinique.
        You're fooling yourself if you think that's secure. If the opponent can look into a text file, he can look into the executable.

        You should use the usual security infrastructure (encryption, permissions, etc.).

        If your only problem here is security: use one of the encryption modules to make the config file "unreadable" for others.


        holli, /regexed monk/