n00b Q: Obfuscation and locking the source

D

Danno

I have been doing some Ruby on and off this year, so I am still a n00b.
My question is:

I create a ruby file, and now I want the source protected and
unreadable, how do I go about obfuscating my ruby file so that I can
distribute it as a non-open-source application?
 
J

James Britt

Danno said:
I have been doing some Ruby on and off this year, so I am still a n00b.
My question is:

I create a ruby file, and now I want the source protected and
unreadable, how do I go about obfuscating my ruby file so that I can
distribute it as a non-open-source application?

This was discussed on this mailing list not too long ago (and on
numerous other occasions in the past). A search of the list archives
should turn up various ideas and techniques to get you started.



--
James Britt

"I was born not knowing and have had only a little
time to change that here and there."
- Richard P. Feynman
 
D

Danno

James said:
This was discussed on this mailing list not too long ago (and on
numerous other occasions in the past). A search of the list archives
should turn up various ideas and techniques to get you started.

I did, all I found were jokes about how ruby is already obfuscated, and
many different ways of saying 'no', and that was back in 2004. I don't
know if that's the answer I want to leave with. Care to be a little
more helpful and point me in the right direction?
 
J

James Edward Gray II

I did, all I found were jokes about how ruby is already obfuscated,
and
many different ways of saying 'no', and that was back in 2004. I don't
know if that's the answer I want to leave with. Care to be a little
more helpful and point me in the right direction?

We did a Ruby Quiz a while back that might offer ideas:

http://www.rubyquiz.com/quiz34.html

It's important to remember how easily the determined person will get
past this though.

James Edward Gray II
 
B

Bill Kelly

From: "Danno said:
I did, all I found were jokes about how ruby is already obfuscated, and
many different ways of saying 'no', and that was back in 2004. I don't
know if that's the answer I want to leave with. Care to be a little
more helpful and point me in the right direction?

Had you seen the ZenObfuscate post?
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/196955

It's a commercial offering and does have a Known Limitations
paragraph that's worth noting.


I'm still trying to sort out how to ship my own commercial
ruby software. Frankly, if it were possible to ship a game
open source and get paid for it, that would be my preferred
route.

My plan is to do the next best thing, and use the release
model pioneered by id Software. Initially, parts of the
game are open source, and the core engine is closed source.
Eventually, the entire game is open sourced (usually
coinciding with the release of the next game in the series.)


So that puts me back in square 1. How to close parts of
my ruby source, even if for a limited time.

I'm considering ZenObfuscate, but the limitations listed
seemed more severe than I would have hoped.

I may go with some embedded decryption key solution and
hope for the best.... :-}

(Or, since my application is a mix of C and ruby, just
leave the ruby parts open from the beginning.)

Sorry I can't offer much in the way of concrete solutions.
But I'm going to have to come up with something eventually,
myself...


Regards,

Bill
 
J

James Britt

Danno said:
I did, all I found were jokes about how ruby is already obfuscated, and
many different ways of saying 'no', and that was back in 2004.

Weird; seems the word "obfuscate" didn't really figure into the
discussions about obfuscating source code. My apologies.

Searching on "hiding" or "protecting" source code was a little better.

This may be useful: http://www.ruby-forum.com/topic/69161#90229

Generally someone asks how they can compile Ruby code into some binary
form to hide the source, and the answer is, you really can't, not in any
secure manner.

Wish I had better links.

My search-fu has failed me. :(



--
James Britt

http://web2.0validator.com - We're the Dot in Web 2.0
http://refreshingcities.org - Design, technology, usability
http://yourelevatorpitch.com - Finding Business Focus
http://www.jamesbritt.com - Playing with Better Toys
 
K

Kenosis

James said:
Weird; seems the word "obfuscate" didn't really figure into the
discussions about obfuscating source code. My apologies.

Searching on "hiding" or "protecting" source code was a little better.

This may be useful: http://www.ruby-forum.com/topic/69161#90229

Generally someone asks how they can compile Ruby code into some binary
form to hide the source, and the answer is, you really can't, not in any
secure manner.

Wish I had better links.

My search-fu has failed me. :(



--
James Britt

http://web2.0validator.com - We're the Dot in Web 2.0
http://refreshingcities.org - Design, technology, usability
http://yourelevatorpitch.com - Finding Business Focus
http://www.jamesbritt.com - Playing with Better Toys

Here's the link to a thread I started on this topic a couple of years
ago. As I recall, it was a very good treatment of the possibilities.
Enjoy!

http://groups.google.com/group/comp...q=obfuscation+kenosis&rnum=1#41e20c85ddbc0579
 
D

Dominik Bathon

Had you seen the ZenObfuscate post?
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/196955

It's a commercial offering and does have a Known Limitations
paragraph that's worth noting.

Have you seen Ruby2CExtension (http://ruby2cext.rubyforge.org/) ?

Obfuscation isn't its main goal but it can be used to obfuscate Ruby code
just fine. And (judging from the ZenObfuscate announcement) it has less
limitations than ZenObfuscate, it can for example translate itself to a C
extension.

I hope that helps,
Dominik
 
R

Ryan Davis

Obfuscation isn't its main goal but it can be used to obfuscate
Ruby code just fine. And (judging from the ZenObfuscate
announcement) it has less limitations than ZenObfuscate, it can for
example translate itself to a C extension.

So can ZenObfuscate.
 
B

Bira

I'm still trying to sort out how to ship my own commercial
ruby software. Frankly, if it were possible to ship a game
open source and get paid for it, that would be my preferred
route.

Have you already taken a look at the Street Performer Protocol[1]?
It's a way to do exactly that, and it's not restricted to games.

That article is a bit old, but AFAIK there have been some succesful
implementations. Fundable.org[2] is a site that allows you to release
something under this model.


[1]http://www.firstmonday.dk/issues/issue4_6/kelsey/
[2]http://www.fundable.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top