Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Decompile Perl2EXE back to original source

by flyingmoose (Priest)
on Mar 29, 2004 at 21:43 UTC ( #340765=note: print w/replies, xml ) Need Help??

in reply to Decompile Perl2EXE back to original source

I just googled on this topic out of curiosity, and I didn't find anything. Perl2Exe, being rather proprietary, isn't going to be documented in terms of how it works...of course, it IS possible (can you read decompiled assembler?) but it's not going to be fun, and I don't think you are guaranteed to get the original source back exactly as you want it. You'd have better luck if it was made by PAR, but even then, I'm not sure it would result in readable code.

What diotalevi says above is correct...but that's assuming you can get Perl source out of it. If that source is somehow encoded in something non-trivial (i.e. not ROT13 or BASE64 or something like that), you may have a hard time getting something to feed to the DeParser. Start by trying to extract the strings from the executable (look at a hexeditor to see if they are there, or try 'strings') -- hopefully you will see something that looks like Perl code, but probably not.

  • Comment on Re: Decompile Perl2EXE back to original source

Replies are listed 'Best First'.
Re: Re: Decompile Perl2EXE back to original source
by diotalevi (Canon) on Mar 29, 2004 at 22:06 UTC
    I didn't assume the person could access the source anywhere. If the original poster can do the equivalent of -MO=Deparse or -MO=Deobfuscate then perl can read itself out of memory from the opcodes.
      Ok, I did not realize it was storing opcodes and not perl. Interesting.

      Anyway, this is still assuming the opcodes are there as could (well it could do anything) store them encoded in some format as a weak attempt at obfuscation. I don't think you can run -MO=Deparse directly on a PAR executable either (or can you?).

        You further misunderstand. That is how perl itself and those modules work. Whether perl2exe includes source or a serialized form of the optree is unknown to me. I'd guess it stores source though since that's at least doable.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://340765]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2020-10-28 01:01 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (259 votes). Check out past polls.