Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby code obfuscation [duplicate]

Tags:

ruby

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

like image 397
Carlos Castellanos Avatar asked Feb 13 '13 15:02

Carlos Castellanos


1 Answers

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.

like image 186
Wayne Conrad Avatar answered Oct 19 '22 03:10

Wayne Conrad