Re: Deconmpile PP compiled code

2009-02-02 Thread Thomas George
Since Winzip didn't seem to know how to handle the file, I made the request
again; somehow, renaming the file makes a difference.

Please do forgive my poor choice of words.. Roderich is kind enough to make
the attempt; thank you Roderich..!

Many thanks,

Thomas

On Mon, Feb 2, 2009 at 2:18 PM, Steffen Mueller wrote:

> Hi Thomas,
>
> Thomas George wrote:
>
>> I'd like to hear from the developers, or some onw who actually knows the
>> answer to this:
>>
>
> I guess both groups include me. Pfew!
>
> What you didn't realize was that the guy you answered that to has been
> around PAR for longer than most on this list (including myself), knows very,
> very well what he's doing, is always helpful and friendly and, most
> importantly, gave you the one correct answer.
>
> I think Roderich deserves a little more respect for the tireless, free, and
> high-quality support he's been providing for *years*.
>
> Is it possible to decompile or display code that is packaged into an
>>
> > executible using PAR or pp..?
>
> I'll repeat the one correct answer that was given earlier:
>
> Simply unzip it. If your unzip utility it brain dead, then do this:
>
> - rename the file to a .zip:
> perl -MFile::Copy=move -e "move(shift, q{iamazip.zip});' YOURFILE.exe
>
> - unzip it
> unzip iamazip.zip
>
> Or open it with winzip or whatever utility you prefer.
>
> Cheers,
> Steffen
>
>


Re: Deconmpile PP compiled code

2009-02-02 Thread Steffen Mueller

Hi Thomas,

Thomas George wrote:
I'd like to hear from the developers, or some onw who actually knows 
the answer to this:


I guess both groups include me. Pfew!

What you didn't realize was that the guy you answered that to has been 
around PAR for longer than most on this list (including myself), knows 
very, very well what he's doing, is always helpful and friendly and, 
most importantly, gave you the one correct answer.


I think Roderich deserves a little more respect for the tireless, free, 
and high-quality support he's been providing for *years*.



Is it possible to decompile or display code that is packaged into an

> executible using PAR or pp..?

I'll repeat the one correct answer that was given earlier:

Simply unzip it. If your unzip utility it brain dead, then do this:

- rename the file to a .zip:
perl -MFile::Copy=move -e "move(shift, q{iamazip.zip});' YOURFILE.exe

- unzip it
unzip iamazip.zip

Or open it with winzip or whatever utility you prefer.

Cheers,
Steffen



Re: Deconmpile PP compiled code

2009-02-02 Thread Roderich Schupp
On Mon, Feb 2, 2009 at 6:17 PM, Thomas George  wrote:
> Wait .. I missed the point of what you were saying .. However, unzip doesn't
> seem to know how to unzip  an executible created with pp.

Don't get fooled by WIMPy programs or programs insisting on certain
filename suffixes. Try unzip from http://infozip.sourceforge.net,
I always do something like this

$ unzip -l some-pp-generated.exe

do find out whether everything was correctly packed in.
If even infozip's unzip doesn't recognize your executabel as a zip file,
then your pp has some serious problem.

> I'd like to hear from the developers, or some onw who actually knows the
> answer to this:
>
> Is it possible to decompile or display code that is packaged into an
> executible using PAR or pp..?
> Many thanks,

Putting my "submitted some small fixes and actually knows the answer" hat on:
Yes, you can - unzip it (both PAR - which is nothing but a zip file - and pp -
which is a zip file with a self extractor tacked on at the front).

Cheers, Roderich


New developments in PAR::*

2009-02-02 Thread Steffen Mueller

Hi PAR folks,

First, let me say that I'm sorry for not replying to any of the posts to 
the list for the past few weeks. I'm currently behind a proxy that 
doesn't allow NNTP to pass through and I'm not actually subscribed to 
the mailing list as such. That makes participation a bit of a problem, 
but I'm still reading via http://nntp.perl.org.


However, this doesn't mean PAR has been untouched. Quite the contrary: 
There have been over a hundred commits since the start of the year and 
the (unified, context) diff since the last revision from 2008 amounts to 
over 8000 lines.


Most of the development hasn't been in the core PAR distribution but in 
the repository extensions. A particularly large fraction of the new code 
is in tests. The PAR::Repository and its client now have a respectable 
test suite and in the process of writing it, I discovered a plethora of 
small and large bugs. Improving the test suite was a necessary precursor 
to the necessary refactoring that allowed me to add significant new 
features. Specifically, there are two big new features:


PAR::R::Client now fully supports automatic updates from the remote 
repository. That means: you specify one or more repository URLs and the 
client will automatically download, install, and *upgrade* your packages 
on demand. This mostly fixes the number one issue with the use of 
PAR::R::Client and even PAR in general: The penalty of loading/unpacking 
the PAR files or pp packaged executables (locally or remotely). This is 
because the *contents* of the .par's are installed into your perl 
libraries. It's as simple as adding the following to the top of your 
program[1].


use PAR {
  repository => 'https://companyserver.com/bigapp/',
  upgrade=> 1
};

I put a write-up of some of the more painful technical issues on 
use.perl, so if you are interested in some ugly tricks with respect to 
hooking into perl's module loading, have a look at 
http://use.perl.org/~tsee/journal/38343.


While I fully expect that this completed upgrade support isn't perfect 
yet, the other big development is still much less mature but also a lot 
more fundamental.


Let's take a step back. Ever since I wrote PAR::Repository::*, people 
mistook it for a PAR-based PPM replacement. It was never intended to be 
a package manager/installer like PPM but instead as a sort of 
application server that could be comfortably and centrally managed, 
maintained, and upgraded. Even having separate staging and production 
repositories is quite simple as a PAR repository is just a directory on 
an ordinary web server or file system. Heck, you can even import one 
into git and switch branches as your heart desires. Since the clients 
simply fetch the most current packages for their specific needs, they 
are always be up to date when launching a new application from the 
repository. This envisaged use scenario has been somewhat undermined by 
the "auto_install" option that only installs missing (but not updated) 
packages. The auto-upgrading as outlined above somewhat reclaims the 
original idea of the dumb clients that just use the best that server has 
to offer.


After I gave a talk about PAR and the repository concept at YAPC::EU 
2008 in Copenhagen, people again asked whether they could use a PAR 
repository in place of PPM. I said they couldn't and that the 
fundamental difference is that PAR::Repository finds dependencies 
dynamically, recursively, at run-time, whenever a module is required as 
opposed to PPM's static dependency information. But at the time, I 
already had a secret scheme for adding static dependency information to 
PAR repositories. Since the work on PAR is done purely in my not so 
copious spare time, I didn't spill the beans just yet in case I never 
finished it. Seems I was lucky.



Since last night, there are development releases of PAR, 
PAR::Repository, and PAR::Repository::Client that sport support for 
static dependency extraction from .par files, storage thereof in the 
repository, and resolution and application of it in the client!



Getting to this point required a bit of Yak Shaving.
- PAR::Dist's merge_par routine formerly simply copied the first 
package's META.yml. Now, it also merges the "provides" as well as the 
various requires-like sections.
- The tests of both PAR::Repository and ::Client were in dire need of 
improvement because...
- ... both modules needed some refactoring to make way for the rest of 
the changes.

- The PAR::Repository aquired a new index file for dependencies.
- The PAR file injection routines use the information from META.yml to 
fill it. The removal routines correctly remove the information again.
- To make up for the extra bandwidth required for the dependency 
information, a checksum-scheme has been implemented to check for updates.
- The client has a new option "static_dependencies" to enable recursive 
resolution of dependencies as found in the new dependencies index.
- The "use PAR {...}" interface now has a 

Re: Deconmpile PP compiled code

2009-02-02 Thread Thomas George
Wait .. I missed the point of what you were saying .. However, unzip doesn't
seem to know how to unzip  an executible created with pp.

I'd like to hear from the developers, or some onw who actually knows the
answer to this:

Is it possible to decompile or display code that is packaged into an
executible using PAR or pp..?
Many thanks,

Thomas


On Mon, Feb 2, 2009 at 8:55 AM, Thomas George wrote:

> Roderich, Octavian,
>
> Unless you've downloaded the pre-compiled binaries, it needs to be
> compiled; I'm not interested in pre-compiled binaries.
>
> Thanks,
>
> Thomas
>
>   On Mon, Feb 2, 2009 at 12:14 AM, Roderich Schupp <
> roderich.sch...@googlemail.com> wrote:
>
>> On Mon, Feb 2, 2009 at 7:08 AM, Octavian Rasnita 
>> wrote:
>> > pp doesn't compile. It creates a package with more files, including the
>> clear source code of your program.
>>
>> Correct.
>>
>> "Thomas George" wrote:
>> > ... is it possible to decompile or display code that is compiled using
>> pp..?
>>
>> Simply run unzip on the generated exe.
>>
>> Cheers, Roderich
>>
>
>


Re: Deconmpile PP compiled code

2009-02-02 Thread Thomas George
Roderich, Octavian,

Unless you've downloaded the pre-compiled binaries, it needs to be compiled;
I'm not interested in pre-compiled binaries.

Thanks,

Thomas

On Mon, Feb 2, 2009 at 12:14 AM, Roderich Schupp <
roderich.sch...@googlemail.com> wrote:

> On Mon, Feb 2, 2009 at 7:08 AM, Octavian Rasnita 
> wrote:
> > pp doesn't compile. It creates a package with more files, including the
> clear source code of your program.
>
> Correct.
>
> "Thomas George" wrote:
> > ... is it possible to decompile or display code that is compiled using
> pp..?
>
> Simply run unzip on the generated exe.
>
> Cheers, Roderich
>


Re: Deconmpile PP compiled code

2009-02-02 Thread Roderich Schupp
On Mon, Feb 2, 2009 at 7:08 AM, Octavian Rasnita  wrote:
> pp doesn't compile. It creates a package with more files, including the clear 
> source code of your program.

Correct.

"Thomas George" wrote:
> ... is it possible to decompile or display code that is compiled using pp..?

Simply run unzip on the generated exe.

Cheers, Roderich