From: John L. <jo...@jo...> - 2006-01-25 17:43:14
|
On Jan 24, 2006, at 8:56 PM, Aidan Rogers wrote: > Does anyone have any suggestions on how to obfuscate a RubyCocoa > application? I've thought a little about this in the past, but haven't ever sat down and tried anything. What I've considered is creating a password-protected ZIP file from your Ruby source, and putting that in the Resources directory of your app bundle instead of the raw sources. Then, in rb_main.rb, open the ZIP file, extract each file to a Ruby string, and eval it. That should be the equivalent of the existing "require" loop. Obviously, "open the ZIP file" is the tricky part, since you don't want to hardcode the password in rb_main.rb. I could see an ObjC class that handles the ZIP reading (using some obfuscation on the password to hide it in the binary, like xor'ing with a secret number) and returning an NSString to rb_main, which could then be eval'ed. (I wouldn't claim that any of the above is "secure," but you didn't ask for security, you asked for obfuscation. ;) --John |