Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

PAR only filters one of two copies of the script to be placed in the executable

by atopolc (Pilgrim)
on Nov 02, 2007 at 17:27 UTC ( #648698=perlquestion: print w/replies, xml ) Need Help??

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

I am currently using PAR to create an executable that I can deliver to users who don't have perl installed on their machines. The exe has to connect to a database and must contain a password so I thought it would be a good idea to filter the code rather than keep it in plain view. Below is the command I am using to get PAR to filter the code.

pp -f Bleach -o out.exe out.pl

Because the executable is a self extracting zip archive I can open up the contents and take a look with a package like winzip.

To my surprise

There are two versions of the original perl script within the archive. The first is located at
 script/
and is filtered. The other copy is located at
 lib/
and is in plain text.

Does anyone know how to get both copies to filter?

Replies are listed 'Best First'.
Re: PAR only filters one of two copies of the script to be placed in the executable
by erroneousBollock (Curate) on Nov 02, 2007 at 17:41 UTC
    an executable that I can deliver to users who don't have perl installed on their machines. The exe has to connect to a database and must contain a password
    That sounds dubious. Is the database on their network or yours ?

    If it's on their network, put the user/pass in a plain textfile that gets read by the executable. You really shouldn't care if it readable by the customer.

    If it's on your network, the executable should talk to the database via a carefully crafted set of RPC APIs (SOAP, XMLRPC, JSON, REST, whatever) that use password-auth/ACLs/IPs/certificates as appropriate to secure the service. Even then, you can feel free to store those credentials on the client's disk separately to the executable... just make sure users are aware of the security issues associated with losing/sharing their credentials (and you should have policies to deal with those aspects).

    It's a really bad idea to expose an RDBMS over the internet.

    -David

      Thanks for your reply. This application is for internal use only, on the same network, on the same database, and not on the internet.
Re: PAR only filters one of two copies of the script to be placed in the executable
by Anonymous Monk on Nov 03, 2007 at 10:27 UTC
    I cannot replicate your results with PAR 0.972 ( out.pl only appears under script, bleached).
      I'm running PAR 0.973 on activestate, perl, v5.8.8 built for MSWin32-x86-multi-thread.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-12-04 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (30 votes). Check out past polls.

    Notices?