|Syntactic Confectionery Delight
A real challengeby tachyon (Chancellor)
|on Jul 16, 2001 at 16:59 UTC
tachyon has asked for the wisdom of the Perl Monks concerning the following question:
At this node PerlApp decompile? a fellow monk chinman has asked for the help of the perl monks. He has compiled a script usiing PerlApp from Active State. His problem is that he has lost the source code. Decompiling the app is trivial and generates 4 source code files (amingst others) that chinman wishes to retrieve. Having established to my satisfaction that the afore mentioned monk did indeed generate this app (he correctly names all the component scripts, etc) the challenge is now to regenerate his original source. Now Active State has encoded the script data so that it is no longer simple ASCII so this is no gimmee.
But what is the encoding algorithm? To shed some light I asked him to encode this script:
The embedded encoded script is interesting. As it is binary encoded and unlikely to pass easily through PM i have used the following subto encode both the original and the embedded PerlApp script:
Here is the unecoded and encoded data with a script to regenerate the original source data (note we are using WIN32 so we have CRLF -> chr 13 10. In the unencoded part you can easily see the ASCII series but in the embedded script it is gone. The ratio of 343:333 indicates that a simple 8:7 bitshift is not what has been done but what has? Nor does the pattern obviously repeat.
Can you crack the code and help chinman? Perhaps more data will be required. I have asked for a linear string to check for repeats but this is what we have to work with currently.
Edit Masem 2001-07-16 - READMORE moved per request