From: Gregory Millam Date: 2004-06-02T22:13:08+09:00 Subject: Re: Obfuscating Ruby Code. Received: Wed, 2 Jun 2004 21:42:14 +0900 And lo, Lothar wrote: > But you must provide the decryption code. And whatever you do, you only > need to add one print stratement at the right position to dump the encryption > key. And if this position is known, the cracker got it. Why even bother modifying the ruby source? Create a C extension that defines a "myrequire", or redefines require so that it loads the provided ruby script after passing it through your proprietary decrypting code. Then call ruby with ruby -r mydecrypter.so -e "myrequire 'main.crb'" (crb = encrypted ruby?). The C extension doesn't need to be GPL, as it's not a part of the ruby interpreter, just a compiled .so that's loaded at run time. No need to provide the code for that. - Greg