Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Decompile an executable created through perl2exe

by mithunkarthik2020 (Initiate)
on Aug 05, 2020 at 15:42 UTC ( [id://11120325]=perlquestion: print w/replies, xml ) Need Help??

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

Hi Perl Monks, I am new to Perl and have taken over some of the support for Perl code. I have many executables which were created many years back and it does not have source code. I am running into support issues and the person coded it is no longer associated with our organization. I went through several forums and some say that we can retreive source by converting the exe to .zip and then unzip to get modules and some are pointing to http://www.thice.nl/perl2exe-back-to-perl-2014/ where the exe is being pulled in assembly coding and extract the main.pl however if there are associated pm or functions or subroutines I am not able to extract it. is there a way we get back the modeule/subroutines from the exe which was created by PERL2EXE. Any help or insight to get the source code back is appreciated. Thanks, Mithun
  • Comment on Decompile an executable created through perl2exe

Replies are listed 'Best First'.
Re: Decompile an executable created through perl2exe
by harangzsolt33 (Chaplain) on Aug 06, 2020 at 06:05 UTC
    Well, if you look into Perl2Exe's documentation, it says that it gives you the option to include certain modules in the output Exe file. However, this is not done by default. So, Perl2Exe includes the perl source code of the main program and the perl interpreter. But it does not include the modules unless it is specifically told to.

    Source:
    http://www.indigostar.com/pxman.html - look for string "#perl2exe_include modulename"

      Using the equivalent of Linux's strace for your OS will tell you what files (=external perl modules, text) are read during runtime and you will find whether said modules are external to the exe or are also included in the exe and you need to adjust the method in order to extract them too.

      EDIT: just had a look at the comments of the link you cited and there is a similar case where more than "main" needs to be extracted.

      Thank you for your response. I am writing an disassembly code to crack this. I will let you know if I am able to do so.
        Edit : Thank you for your response. I am writing an disassembly code to crack this. I will let you know if I am able to crack it. BTW it is me the original question poster.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11120325]
Approved by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-19 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found