What Are Some Good Ways to Prevent People from Copying My Source Code

What are some good ways to prevent people from copying my source code?

If people really want to get access to your source code they can do that fairly easily.

It is possible to slow people down to a limited degree by obfuscating code.

See:

  • http://code.google.com/p/minify/
  • http://refresh-sf.com/yui/
  • http://ajaxian.com/archives/utility-javascript-obfuscator

Maintaining obfuscated code is difficult. What you want to do is obfuscate it before deployment so that you can test and debug with the normal version. Debugging problems on a live site can be made a lot more difficult by the obfuscation.

What are some good ways to prevent people from copying my source code?

If people really want to get access to your source code they can do that fairly easily.

It is possible to slow people down to a limited degree by obfuscating code.

See:

  • http://code.google.com/p/minify/
  • http://refresh-sf.com/yui/
  • http://ajaxian.com/archives/utility-javascript-obfuscator

Maintaining obfuscated code is difficult. What you want to do is obfuscate it before deployment so that you can test and debug with the normal version. Debugging problems on a live site can be made a lot more difficult by the obfuscation.

What are some good ways of keeping content from being copied to other sites

Place some <div style="display: inline; position: absolute; overflow: hidden; width: 0px">useless words</div> in the text. It won't display for reading, but if someone copy and paste... "WOW where it came from WTF!! *CRY*"

how to hide my source code so to not be copied

Don't do this! It makes no sense to do this, since the user can disable the script,
and there are many tools like Firebug by which a user can see the code.

The best way to keep safe the store is installing a security camera while leaving the doors open.

You can simply disable the right click by following:

<body oncontextmenu="return false">
...
</body>

or

<script language="javascript">
document.onmousedown = disableclick;
status = "Right Click Disabled";
Function disableclick(e)
{
if(event.button == 2)
{
alert(status);
return false;
}
}
</script>

The code above is from this article

How to stop programmers to copy the code from GitHub when they leave the company?

If the code is in a public repository anyone can copy it. So I'd assume this must be a private repository.

The employees account should be revoked on GitHub. This stops them from continuing to access the repository. Github also allows you to see the number of unique users that have cloned the repository. If this goes up unexpectedly just before the employee leaves you have an indication that you need to investigate - at this point you should ask Github for the IP address logs.

Meanwhile if you have any feasible evidence the user has copied the repository as is to their own personal github account technically it would be trivial for github to check. They could simply compare the HEAD commit SHA against your repository. Whether they would do so without a court order I do not know.

Saying this github is just one of many vectors go get code out of an organization. If you allow users to clone repositories onto personal equipment (say work from home) then you can never fully prove they haven't copied it elsewhere. If they have USB access to their work machine what stops them manually copying it off? If internet usage is not monitored and restricted they can just zip it up and upload it to any of a number of file hosting sites. And if worst comes to worst there is always the take a photo of the screen on a personal mobile device or print the lot out and walk it out the front door approach.

Companies often find attempting to resolve issues like this with technical measures are bottomless money pits that end up hindering developers work and morale. I'd suggest usually a far better approach is to try and push a culture where developers respect you enough to not attempt to steal from you. Meanwhile if ever you have viable proof an employee has abused their access to follow the correct legal process.

How to prevent your JavaScript code from being stolen, copied, and viewed?

You could obfuscate your Javascript. There are a lot of tools to do that in the wild, e.g. http://www.javascriptobfuscator.com/. However it does not prevent anyone to see the code, but makes it harder to read.

How to protect your software code?

Very few things in a program are truly novel. Almost everything that you are likely to put into your code, someone else could invent on their own. Generally more easily than they could learn it by reading your code. Reading code is harder than writing it, and most programmers don't really like doing it anyway.

So it's much more likely that they will look at your app and think "I could do that", then "That's cool, I'm gonna read that code and then copy it!". Even if they understand it, you will still own the copyright, you still get to market first.

I recommend that you just forget about it.



Related Topics



Leave a reply



Submit