develooper Front page | perl.perl5.porters | Postings from October 2003

Re: How to tell if Perl has -DDEBUGGING?

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
October 26, 2003 12:29
Subject:
Re: How to tell if Perl has -DDEBUGGING?
Message ID:
20031026202912.GA20665@localhost.comcast.net
On Sun, Oct 26, 2003 at 07:12:14PM +0000, Nick Ing-Simmons wrote:
> perl -MO=Deparse secret-script
> 
> will load the decrypt filter and then render the script ;-)

Filter::decrypt has a way of disabiling that these days, so it says,
by detecting if the compiler is in use.  But that means you can still
take the code apart, starting with the publicly documented functions using
coderef2text().

       6.   Check that the Perl Compiler isn't being used.

            There is code in the BOOT: section of decrypt.xs that
            shows how to detect the presence of the Compiler.
            Make sure you include it in your module.

            Assuming you haven't taken any steps to spot when the
            compiler is in use and you have an encrypted Perl
            script called "myscript.pl", you can get access the
            source code inside it using the perl Compiler back-
            end, like this

                perl -MO=Deparse myscript.pl

            Note that even if you have included the BOOT: test,
            it is still possible to use the Deparse module to get
            the source code for individual subroutines.



-- 
Michael G Schwern        schwern@pobox.com  http://www.pobox.com/~schwern/
There is a disurbing lack of PASTE ENEMA on the internet.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About