Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re^2: is it irreversible

by diotalevi (Canon)
on Mar 14, 2003 at 13:53 UTC ( #243033=note: print w/ replies, xml ) Need Help??


in reply to Re: Re^2: is it irreversible
in thread Here is a commercial obfuscator

You don't think I'd obfuscate the sources I planned to distribute Edit [ work with ] do you? That'd be nuts. Anyhow, this would happen two ways - most of the time it doesn't matter that only the perl lexer/parser can completely parse perl. If the source is written correctly the first time then its trivial to do the first two of the major obfuscations - symbol renaming and text string encoding. I think that if I were serious about having "obfuscated code" I'd hack up B::Deparse (exempting BEGIN blocks which would have to be done by hand or another method) so that it did all the work for me anyhow which alleviates all the problems you've described.


Seeking Green geeks in Minnesota


Comment on Re: Re: Re^2: is it irreversible
Re: Re: Re: Re^2: is it irreversible
by Anonymous Monk on Mar 14, 2003 at 14:12 UTC
    Usually after release of 1.0 version some versions come after. So you'll have to repeat this obfuscation process for each version. Parsing perl is needed because you have to destinguish sub names and same words inside string constants or regexps (e.g. "sub communicate {}" and "print q!unable to communicate!;"). Yes, the only viable solution is writing something similar to or hacking B::Deparse.

      Actually I was thinking of something like ^sub\s+(\w+) but yes, we both have valid points here. Anyway, the free obfuscator posted yesterday appears to nearly as functional as this 1K/2K thing you linked to.


      Seeking Green geeks in Minnesota

        No it has a lot of flaws. It doesn't support symbol exceptions. It won't work with things like s#(${blah})xx# $v = $1; $v =~ s,foo,$bar,eg; $v . $v . $v;#eg it won't correct the export table of your module, it definitely won't handle things like my $var ="<<EOF" Here is $var1 expansion EOF ; or even qq# $var and $var# It can't (and won't theoretically be comparable in reliability) to this commercial tool.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://243033]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-12-27 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls