[SPAM: 4.499] [Pyrex] Using pyrex to hide source.
Bob Ippolito
bob at redivi.com
Thu Feb 19 01:31:08 CET 2004
On Feb 18, 2004, at 7:04 PM, Greg Ewing wrote:
> jbi130 at yahoo.com:
>
>> I've noticed that with some little changes to some of my pure Python
>> modules I can compile them with pyrex into C and they pretty much work
>> the same.
>>
>> Is this a reasonable method to hide some of my more critical modules?
>
> It would certainly be a lot harder to decompile than
> Python bytecode.
But it does give you some idea how things are organized by how much
traceback-helping information it includes.. I would imagine that
someone with enough time on their hands could write a decompiler that
looks to see what python api functions you are calling. He says that
he made "little changes to pure Python modules", which probably means
that Pyrex spits out pretty predictable code ;)
FWIW, I "hey if I compile this with a C compiler, people can't
reverse-engineer it" is a totally bogus strategy. It almost makes me
want to go out of my way to prove that wrong, but the
warez/cracking/emulation scenes do that pretty well without my help.
More likely than not, your software program doesn't even contain
anything worth disassembling at the python bytecode level of
obfuscation anyways... and if it did, compiling it with something a
little tougher isn't really going to stop someone.
> Just keep in mind that Pyrex is still under development,
> so if your customers are using your code for anything
> critical, there's a risk of them getting bitten by
> bugs in Pyrex.
or Python, for that matter.. In either case, if the software product's
testing is good enough Pyrex/Python/libc/compiler/etc. bugs should
percolate up ;)
-bob
More information about the Pyrex
mailing list