문제

I'm trying to get a Perl script (.pl) out of an executable (.exe) file. The .exe file was originally coded in Perl but the .pl file was not kept. Is there a quick way to do this? I'm using Strawberry Perl for windows.

Thanks

도움이 되었습니까?

해결책

Rename .exe to .zip and check if files can be extracted

다른 팁

From the PAR FAQ:

How do I extract my script out of packed executable?

In other words, "I did a `pp foo.pl' and I lost foo.pl, how do I get it back?".

The answer is to just use unzip/winzip/winrar/whatever to decompress the executable, treating it like a normal Zip file. You may need to rename the executable into a .zip extension first.

pp relies on PAR to create the executable. PAR relies on Archive::Zip, so at some level the file contains zipped copies of the perl scripts used to create the executable.

Typically, these programs attach a loader to the front of a zip archive which unzips the files to a temporary directory and invokes the script indicated as the program's entry point.

I'd try two things:

  • root around in all the typical Temp directories (\Users\Username\AppData\Local\Temp for instance) for a directory containing your script and it's prerequsites.

  • try to uncompress the exe as a zip, possibly removing the loader from the start of he program first, using a byte editor.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top