8

I have to obfuscate ruby code to hide sensitive source. I need to be headed in the right direction in order to achieve what I want, so:

  1. Is there a Ruby alternative for Python's pyc?, I saw version.rbc files inside many gems. How can it be generated? Does this process work for other (complex, not just simple VERSION declaring) kinds of Ruby files?.

  2. RubyEncoder does the job (does it? Help me out here), but it requires to buy a license. That's why I would consider it as my last resort.

  3. Any other suggestion

sawa
  • 165,429
  • 45
  • 277
  • 381
Carlos Castellanos
  • 2,358
  • 4
  • 25
  • 43
  • Can you give details of the requirements. There may be another solution than obfuscation. – Kevin Brydon Feb 13 '13 at 15:44
  • Sensitive code to check license and limit of subscription plans should not be visible/readable to anybody. My deployment is not cloud based since I deliver an installable copy of my application, and i don't want to deliver some "know how" of my own, (not open source) – Carlos Castellanos Feb 13 '13 at 15:51

1 Answers1

11

Write a native extension in C, putting your sensitive code in there, along with enough of the program's critical logic to make the extension essential to the program's execution.

That doesn't make it impossible for someone to bypass or reverse engineer your sensitive code, but it does make it harder. Also, there are better techniques for making compiled code harder to reverse engineer than there are for making Ruby code hard to reverse engineer.

Community
  • 1
  • 1
Wayne Conrad
  • 103,207
  • 26
  • 155
  • 191