How to encrypt Ruby script

Hi guys,

Can any one tell me how to encrypt one ruby script… ?

Thanks-
Shrikant

For simple cases I use

openssl des3 -salt -in $SOURCE -out $DEST

where $SOURCE is the name of the file I want to encrypt and $DEST is
the name of the file the encrypted data will be written to.

Its encripted but its not running…

Here is error:
rubynetco2.rb:1: Invalid char \037' in expression rubynetco2.rb:1: Invalid char\215’ in expression
rubynetco2.rb:1: Invalid char \345' in expression rubynetco2.rb:1: Invalid char\312’ in expression
rubynetco2.rb:1: Invalid char \257' in expression rubynetco2.rb:1: Invalid char\226’ in expression
rubynetco2.rb:1: syntax error, unexpected tCONSTANT, expecting kDO or
‘{’
or ‘(’
Salted__hKT���%J��E�Yb�lh�m9�h+dMz▒�}�9\�2xx�…
^
rubynetco2.rb:1: Invalid char \366' in expression rubynetco2.rb:1: Invalid char\375’ in expression
rubynetco2.rb:1: Invalid char \034' in expression rubynetco2.rb:1: Invalid char\245’ in expression
rubynetco2.rb:1: Invalid char \213' in expression rubynetco2.rb:1: Invalid char\030’ in expression
rubynetco2.rb:1: Invalid char \037' in expression rubynetco2.rb:1: Invalid char\251’ in expression
rubynetco2.rb:1: syntax error, unexpected ‘}’, expecting $end
…KT���%J��E�Yb�lh�m9�h+dMz▒�}�9\�2xx�/����w
�`��rm���s���…
^
[[email protected] tm

Regards*,*
Shrikant L.
RHCE | Linux Admin | Ruby on Rails Deployment
Pune | MH | India.
M.+91-9373920803
http://shriikant.blogspot.com/
http://linux-fundamentals.blogspot.com/

On Tue, Aug 7, 2012 at 3:43 PM, Peter H. <

On 7 August 2012 11:36, Shrikant L. [email protected]
wrote:

Its encripted but its not running…

Why would it run? It’s no longer a Ruby file, it’s encrypted!

Yes its cool, but i want to run one ruby script and script having
confidential info.
So i need run that in encrypted mode.

Regards*,*
Shrikant L.
RHCE | Linux Admin | Ruby on Rails Deployment
Pune | MH | India.
M.+91-9373920803
http://shriikant.blogspot.com/
http://linux-fundamentals.blogspot.com/

Ruby does not have an “encrypted mode”

You asked “Can any one tell me how to encrypt one ruby script”, you
got the answer to your question

Describe the problem you are trying to solve rather than making things
up (such as encrypted mode ruby)

Puts the RHCE certificate in perspective if you didn’t know what the
openssl command was going to do to the source file

On Tue, Aug 7, 2012 at 5:33 AM, [email protected] <
[email protected]> wrote:

Hi guys,

Can any one tell me how to encrypt one ruby script… ?

Thanks-
Shrikant

The right question is, “How do i obfuscate my ruby source code ?”.
Ruby is interpreted and seems like you would like to have something like
a
compiled binary or a bytecode. All ways I know about of doing this are
payed.

http://rubyencoder.com/

They will compile to a bytecode for you if you are worried about your
intelectual property.

On 7 August 2012 11:46, Shrikant L. [email protected]
wrote:

Yes its cool, but i want to run one ruby script and script having
confidential info.
So i need run that in encrypted mode.

Drip-feeding information like this is very frustrating.

http://www.catb.org/esr/faqs/smart-questions.html
(tl/dr: Please outline your problem, your attempted solutions, and the
errors you’ve had)

Radhames Brito wrote in post #1071531:

The right question is, “How do i obfuscate my ruby source code ?”.
Ruby is interpreted and seems like you would like to have something like
a
compiled binary or a bytecode. All ways I know about of doing this are
payed.

http://rubyencoder.com/

They will compile to a bytecode for you if you are worried about your
intelectual property.

Even this will do little to protect your intellectual property. Even
languages like Java that, by design, compile into intermediate byte code
can be trivially decompiled back into surprisingly readable source code.

Languages that compile directly into native machine code like C and
variants can provide better protection, but even that won’t stop someone
motivated to crack your code.

Executable code in any form cannot be made completely safe:
http://boomerang.sourceforge.net/cando.php?hidemenu

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs