[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Any kind of source protection?

Marcelo

1/21/2006 3:42:00 AM

I would like to know if there is a way to keep my source code "secret":

that's to say, that nobody can read it with a text editor (it doesn't
matter
if it can be viewed through reverse engineering).

Thanks in advance and sorry for my poor English.

6 Answers

Timothy Goddard

1/21/2006 10:30:00 AM

0

You could encode your code in base 64 then do something along the lines
of:

# Start example

require 'base64'

code = <<-END_BLOCK
cHV0cyAnSGVsbG8gV29ybGQn
END_BLOCK

eval Base64::decode64(code)

# End example

This, however, has a performance cost and is easily reverse-engineered.
The other option is to include a module written in c that performs the
functions you need to hide and only distribute the compiled code. Be
careful, however, not to link against certain libraries with more
restrictive licenses than ruby's main one.

Marcelo

1/21/2006 11:07:00 AM

0

And certain kind of compiled form or exe?

Antonio Cangiano

1/21/2006 11:33:00 AM

0

Marcelo wrote:
> And certain kind of compiled form or exe?

Marcelo, for Windows you can use this:
http://www.erikveen.dds.nl/rubyscript2exe/...

Cheers,
--
Antonio Cangiano
My Ruby blog: http://www.antonioca...

Gene Tani

1/21/2006 3:33:00 PM

0

If you google groups <Search this group> for <obfuscate "source code">
or <protect "source code"> there have been several threads about what
you could do with a BSD licensed Ruby, etc. And there have been
lengthy threads also in comp.lang.python about legal/contractual
protections, how to deal with clients etc

OR llok at: Ruby2c and rubyscript2EXE. But I think basically there
isn't a hard to defeat scheme, either compiling/encrypting code, or
re-wiring the interpreter

Marcelo wrote:
> And certain kind of compiled form or exe?

Gene Tani

1/21/2006 3:38:00 PM

0


Gene Tani wrote:
> If you google groups <Search this group> for <obfuscate "source code">
> or <protect "source code"> there have been several threads about what
> you could do with a BSD licensed Ruby, etc. And there have been
> lengthy threads also in comp.lang.python about legal/contractual
> protections, how to deal with clients etc
>
> OR llok at: Ruby2c and rubyscript2EXE. But I think basically there
> isn't a hard to defeat scheme, either compiling/encrypting code, or
> re-wiring the interpreter
>
> Marcelo wrote:
> > And certain kind of compiled form or exe?

there is 1 thing I haven't tried: newobfusc.rb in

http://rubystuff.org/nod...

Eric Hodel

1/24/2006 7:39:00 PM

0

On Jan 24, 2006, at 7:35 AM, Gene Tani wrote:

> Gene Tani wrote:
>> If you google groups <Search this group> for <obfuscate "source
>> code">
>> or <protect "source code"> there have been several threads about
>> what
>> you could do with a BSD licensed Ruby, etc. And there have been
>> lengthy threads also in comp.lang.python about legal/contractual
>> protections, how to deal with clients etc
>>
>> OR llok at: Ruby2c and rubyscript2EXE. But I think basically there
>> isn't a hard to defeat scheme, either compiling/encrypting code, or
>> re-wiring the interpreter
>>
>> Marcelo wrote:
>>> And certain kind of compiled form or exe?
>
> there is 1 thing I haven't tried: newobfusc.rb in
>
> http://rubystuff.org/nod...

I wrote a Ruby obfuscator that emits a compilable C file as part of
the ruby_to_c project. It is not publicly available, however.

--
Eric Hodel - drbrain@segment7.net - http://se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...