CopyProtection with javascript Protecting Your CopyRight

first of all… javascript is always OpenSource… there is nothing you can do about it.

So people become very creative about how to verify if a script was stolen or not.

Here is one example:

protects preview.js

[cc lang=”js” escaped=”true” width=”546″ line_numbers=”off”]
// -> randomized chars that should mean:
this.eFlag = {
m1: “o”,
r1: “e”,
t: “r”,
r2: “.”,
e: “t”,
s: “o”,
a2: “c”,
m2: “o”,
e1: “m”,
r: “v”,
a1: “w”,
a: “e”,
h: “r”,
k: “f”,
m: “c”,
u: “l”

// getting current domain name
var m = String(k[o.qer[1].split(“”).reverse().join(“”)]);

// putting chars in the right order
var q = (o.eFlag.r + o.eFlag.a + o.eFlag.m + o.eFlag.e + o.eFlag.s + o.eFlag.h + o.eFlag.k + o.eFlag.u + o.eFlag.m1 + o.eFlag.a1 + o.eFlag.r1 + o.eFlag.t + o.eFlag.r2 + o.eFlag.a2 + o.eFlag.m2 + o.eFlag.e1);

// testing the current domain name (if vendor-domain)
// m: “”
// q: “”

m = “”; // valid, because m.indexOf(q) == 0
m = “”; // also valid, because m.indexOf(q) == 10
m = “”; // not valid, because does not contain the domain name

/* Search a string for “welcome” returns the position where the word was first found
var str = “Hello world, welcome to the universe.”;
var n = str.indexOf(“welcome”);
The result of n will be: 13

if (m.indexOf(q) > -1) {


liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!