On Wed, Feb 26, 2014 at 10:27 AM, Mario R. [email protected]
Hi everybody, I would like to know, at the present time, in which ways I
can protect my ruby source code that is deployed on machine connected to
I googled a bit and found that I could compile the code to obtain a
bytecode but is it safe? I mean isn’t there a way to reobtain source
code starting from the bytecode?
Thanks in advance for your help.
Translating from source to bytecode is a one-way process – you can’t
the exact same source out from the bytecode. However, it can still be
fairly easy for someone to reverse-engineer the bytecode and get a gist
what the programmer intended the code to do.
You might have found information on JRuby in your search. JRuby normally
compiles Ruby into an intermediate form of bytecode and then executes
but it can also take the extra step of compiling the intermediate
into Java bytecode. Anecdotally, that’s supposed to give you a little
more security because it goes through multiple translations.
But the safest way to protect your code is just not to distribute it,
hosting it all on the web. (I suppose even then, someone may have a
chance of hacking the server it’s on and getting it out.)