Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://243033]
and a log crumbles through the grate...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-06-24 05:39 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.