[ale] Py[h]hon syntax (sic)

Jay Loden jloden at toughguy.net
Sat Jan 29 20:43:35 EST 2005


On Python, you can use "freeze" to accomplish more or less what you're looking 
for. 

-Jay

On Saturday 29 January 2005 10:55 am, Fletch wrote:
> >>>>> "Christopher" == Christopher Fowler <cfowler at outpostsentinel.com>
> >>>>> writes:
>
> Oop, I missed this the other day . . .
>
> [...]
>
>     Christopher> I read in the O'reilly book "Learning Python" that
>     Christopher> the code can be compiled into a .pyc file.  How do I
>     Christopher> compile into .pyc so that I can distribute the code
>     Christopher> without the source being seen?  This is one of my
>     Christopher> biggest problems with Perl.
>
> Python bytecode's not going to prevent anyone from mucking with things
> any more than compiling Java to bytecode does (or C to machine code
> for that matter).  If someone's determined enough they'll be able to
> recover pretty near the original source.
>
>
> Having said that, if you want to raise the bar to discourage casual
> mucking for Perl see perldoc B::Byetcode (although it's still pretty
> experimental), PAR (which will wrap everything up into an executable
> with an embedded zip archive), or one of the obfuscation filters (the
> original Acme::Bleach, the somewhat repetitive Acme::Buffy, or the
> swiss army chainsaw of source obfuscation Acme::EyeDrops) from CPAN.
> Acme::EyeDrops comes with a script that'll easily let you turn:
>
> #!/usr/bin/perl
> print "Hello world\n";
>
>
> Into this (yes, this is valid perl; not that that's going to surprise the
> python people much . . . :)
>
> #!/usr/bin/perl
>                                       ''=~('('.'?'
>            .'{'.(                   '`'|'%').("\["^
>         '-').('`'|                '!').('`'|',').'"'
>  .'#'."\!".  "\/".(              '['^'.').('['^'(').(
> '['^')').'/'.(('`')|            '"').('`'|')').(('`')|
> '.').'/'.('['^"\+").(          '`'|'%').('['^')').('`'
>
>   |',').('!'^('+')).(        '!'^'+').('['^'+').(('[')^
>
>        ')').('`'|')')      .('`'|'.').('['^'/').('{'^'['
>       ).'\\'.('"').(     '`'^'(').('`'|'%').('`'|(',')).(
>      '`'|',').("\`"|   '/').('{'^'[').('['^',').('`'|'/').
>     ('['^')').('`'|   ',').('`'|'$').'\\'.'\\'.('`'|'.').''.
>     '\\'.'"'."\;".(  '!'^'+').('!'^'+').('`'|'%').('['^'#').(
>     '`'|')').('['^  '/').('{'^'[').('^'^('`'|'.')).';'.("\!"^
>     '+').('!'^'+')  .'"'.'}'.')');$:='.'^'~';$~='@'|'(';$^=')'
>     ^'[';$/='`'|'.';$,='('^'}';$\='`'|'!';$:=')'^'}';$~=('*')|
>     '`';$^='+'^'_';$/='&'|'@';$,='['&'~';$\=','^'|';$:='.'^'~';
>      $~='@'|'(';$^=')'^'[';$/='`'|'.';$,='('^'}';$\='`'|'!';$:=
>      ')'^'}';$~='*'|'`';$^='+'^'_';$/='&'|'@';$,='['&'~';$\=','^
>       '|';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$,='('^'}';
>        $\='`'|'!';$:=')'^'}';$~='*'|'`';$^='+'^'_';$/='&'|'@';$,=
>         '['&'~';$\=','^'|';$:='.'^'~';$~='@'|'(';$^=')'^"\["; $/=
>          '`'|'.';$,='('^'}';$\='`'|'!';$:=')'^'}';$~='*'|'`'  ;$^
>           ='+'^'_';$/='&'|'@';$,='['&'~';$\=','^'|' ;$:='.'^  '~'
>             ;$~='@'|'(';$^=')'^'[';$/='`'|"\.";$,=  '('^'}'   ;$\
>              ='`'| '!';$:=')'^'}';$~='*'|"\`";$^=   '+'^'_'   ;$/
>                    ='&'|'@';$,='['&'~';$\=(',')^    '|';$:=   '.'
>                    ^'~';$~=    '@'|'(';$^ ="\)"^     '[';$/   =(
>                    ('`'))|     "\.";$,=   ('(')^     '}';$\  =(
>                    ('`'))|     "\!";$:=   "\)"^       "\}";  (
>                    ($~))=      '*'|'`';   ($^)         ='+'
>                    ^"\_";     $/=('&')|   '@';         ($,)
>                     ='['&     "\~";$\=    ','^         '|';
>                     ($:)=     '.'^'~'     ;$~=         '@'|
>                     '(';     $^=')'       ^'['         ;$/=
>                     '`'|     '.'          ;$,=         '('^
>                     '}';      $\=         '`'          |((
>                     '!'        ));       $:=           ')'
>                     ^((         '}'     ));            $~=
>                     '*'          |((   '`'              ))
>                     ;(             ($^))=               ((
>                     ((              '+'))               ))
>                     ^+             "\_";$/=             ((
>                    '&'            ))|+ "\@";            $,
>                   =((           '['))&  '~';           $\=
>                  ','^         "\|";$:=   '.'          ^'~'
>                ;($~)=                                ('@')|
>              "\(";$^=                               ')'^'['
>
>
> __END__



More information about the Ale mailing list