From: John Joyce Date: 2007-09-02T01:55:22+09:00 Subject: Re: Seeing the source On Sep 1, 2007, at 11:25 AM, Michel Cabili wrote: > Phlip wrote: >> Responding to the thread in general - just put your family jewels >> into >> C++ >> behind a Ruby layer, and ship Ruby for the easy stuff that your >> clients >> don't need to steal... > > That seems a fair solution. Although I'm not that deep into Ruby > yet, I > saw some links concerning creating extensions for Ruby... but in C. > There must be something equivalent for C++... > > That means that when I create for instance my extension (let's say > "funky_extension"), the file concerning the extension will be compiled > therefore obfuscated? Is that what you're talking about? > -- > Posted via http://www.ruby-forum.com/. > You should use C for Ruby extensions. Ruby is implemented in C. JRuby might allow Java extensions...? If you know C++ you can probably handle the C stuff. Oh, one other idea for obfuscation, you could always also use Ruby Inline for some things. (like a routine you run first to decrypt your Ruby files or whatever.) Depending on the size of your app, you could pretty easily make it at least confusing to look at with a simple Rot13, or just replacing all newline characters in the Ruby files with some unique identifier string. (other than the first one called, which would include Inline C or whatever to decrypt) You could make it even simpler. Consider Ruby's predefined variables (they're globals that start with $) and command line flags and arguments. there might some simple to implement but not so obvious tricks you could do there.