|
From: Jonathan P. <jp...@dc...> - 2006-01-27 13:00:14
|
On 25 Jan 2006, at 4:56, Aidan Rogers wrote:
> Does anyone have any suggestions on how to obfuscate a RubyCocoa
> application?
I think the first question you need to answer is how secure does the
obfuscation need to be? Somebody will always be able to (with some
effort) extract the parse tree from the interpreter to see what's
going on.
There are different levels of obfuscation that might work. For example:
* Hide the code in some form (like John's suggestion of a ZIP file)
* Come up with a tool to reformat the code so it's hard to read.
This might entail:
removing line breaks, spaces etc (like in the obfuscated ruby
contest)
munging string literals so they're not easy to read
e.g "hello" -> ("pkosd".unmunge)
renaming local variables
renaming methods
* Compiling to native code somehow
Renaming methods is tricky because of the dynamic nature of ruby -
it's hard to catch all the bits that need to be renamed statically.
Method calls on standard library and core objects will still be 'out
in the open', unless you alias them all in some way.
Would it be sufficient to distribute your application with licensing
restrictions? Are you trying to stop people from seeing the code,
modifying the application, redistributing it, ... ?
Sorry I don't have any better suggestions at the moment. Once you
know how secure it needs to be, it might be possible to come up with
some more concrete ideas.
Cheers,
Jonathan
|