Protecting your code online

Monkey Forums/Monkey Programming/Protecting your code online

Leo Santos(Posted 2011) [#1]
Hi,

What's the best way to protect your code from being copied & pasted and end up showing in some obscure website surrounded by ads of dubious taste?

For instance, is Flash a better choice compared to HTML5, since the code is not immediately apparent? Or are there tools to download the SWF and it ends up being even easier, since our imaginary thief would get all resources in a single, convenient file?

Does obfuscating the Javascript code make any difference? (you can still copy & paste it, even obfuscated, can't you?).

I've seen pages that are very suspicious repositories of games, I wonder if the game authors are getting any revenue from the ads... :-P

Leo.


GW_(Posted 2011) [#2]
Javascript obsfucation is useless. there are pretty printers online that will change it back.
For Flash there are commercial obsfucator programs but the only ones that work are pricey!

An obfuscation step could be added to monkey at the code generation step. that would be great solution.


dopeyrulz(Posted 2011) [#3]
I believe Mark has mentioned something about doing this eventually


a1programmer(Posted 2011) [#4]
There are a few tools that can decompile a SWF. HP makes such a tool, called SWFScan, which is free (although you have to register on the site). It's primarily a security based tool to check for vulnerabilities and left over debug information in your code (for corporate environments), but it can also be used to get something fairly close to the original source.

If steps are going to be take to obfuscate JS, a similar step could be taken to obfuscate AS3 code.

However, if someone is motivated enough, they can get the code.

Check out jsbeautifier.org . :)


Gerry Quinn(Posted 2011) [#5]
Is there any way to add a stage to the Monkey build process? It seems to me that you could at least make a simple variable name munger that would adjust the names of anything called bb_something or bbt_something to something unreadable. Should be very easy to write.

It wouldn't stop anyone stealing the code, but it would help stop them understanding it.


slenkar(Posted 2011) [#6]
with javascript you can check the browsers URL to make sure its your site

FLash can communicate with js to do the same thing

or you can use an API like kongregate and not run the game if a username is not found


Dabz(Posted 2011) [#7]
http://www.indiecodez.com/forum/index.php/topic,199.msg5339.html#msg5339

Dabz