如何在 javascript 中强制执行软件许可?

发布于 2024-11-09 05:21:08 字数 1459 浏览 0 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

牵你手 2024-11-16 05:21:08

除了混淆之外,没有其他方法可以“加密”JavaScript 代码,所以是的,确实没有办法对商业 JavaScript 产品进行可靠的复制保护。

它们仍然值得提供,因为

  • 西方国家的大多数企业客户都不敢冒险窃取软件,因为存在被抓住并被起诉巨额金钱的风险 - 如果不是通过代码,那么可能是通过心怀不满的实习生吹嘘举报

  • 与盗版办公软件不同,盗窃行为与原始 JavaScript 片段一样公开可见和可访问 - 您永远不知道可能存在(或出现)什么技术来使用算法方法找到被盗的 JavaScript 代码。

  • 真正的业务损失可能并不像人们想象的那么严重:如果价格足够便宜,足以窃取 JavaScript 小部件,那么如果该小部件无法被窃取,人们就会简单地转而使用免费小部件。商业 JavaScript 小部件通常不提供任何独特功能 - 流行的东西往往会很快被克隆 - 它们的卖点通常是它们也可以做许多开源解决方案所做的事情,但是极其< /em> 嗯,快速,干净,有据可查。

There is no way to "encrypt" JavaScript code other than obfuscating it so yes, it's true there is no way to reliably copy-protect a commercial JavaScript product.

They are still worth offering because

  • Most corporate customers in western countries will not dare risk steal software due to the risk of getting caught and sued for vast amounts of money - if not through the code, then maybe through a disgruntled intern blowing the whistle

  • Different from pirated office software, the theft is publicly just as visible and accessible as the original piece of JavaScript - you never know what techniques may exist (or come up) to find stolen JavaScript code using an algorithmic approach.

  • The real loss of business is probably not as heavy as one might think: People cheap enough to steal a JavaScript widget would simply fall back to a free one if that one wouldn't be available to steal. Commercial JavaScript widgets usually don't offer any unique functionality - popular things tend to get cloned quickly - their selling point is usually that they do what dozens of Open Source solutions do too, but extremely well, fast, cleanly, and well-documented.

长伴 2024-11-16 05:21:08

总是有混淆工具:
http://www.javascriptobfuscator.com/default.aspx

这个问题彻底阐述了(双关语)混淆实践的利弊

There's always obfustication tools:
http://www.javascriptobfuscator.com/default.aspx

This so question throughly hashes out (pun intended) the pros AND cons of obfustication practices

潜移默化 2024-11-16 05:21:08

我想你不能强制执行许可证。
也许他们依赖于计划使用其产品的公司的诚实……

毕竟,你有一些具有双重许可证的开源项目:免费/开放项目的 GPL,否则商业(iText,例如 IIRC)。同样的推理也适用于这些项目。

此外,您还可以公开该软件的残缺版本。当然,如果您发现有人使用它并付费获得完整版本的网站,那么也很容易窃取它。

通常,就像公司销售的大多数开源软件一样,他们依靠软件周围的服务来赚钱:你购买他们的软件,你会获得高级支持,例如快速修复和更新、定制等。

You cannot enforce the license, I suppose.
Perhaps they rely on honesty on the part of the companies planning to use their product...

After all, you have some open source projects with dual license: GPL for free / open projects, commercial otherwise (iText, for example, IIRC). The same reasoning applies for these projects.

Beside, you can make public a crippled version of the software. Of course, if you find a site of somebody using it and having paid to have the full version, it is easy to steal it too.

Often, like most open source softwares sold by companies, they rely on services around the software to make money: you buy their software, you get premium support, like fast fixes and updates, customizations, etc.

云胡 2024-11-16 05:21:08

这是网络作为开放技术之间冲突的结果,所有客户端数据都开放供任何人查看,与企业和牟取暴利的个人的专有和货币利益相冲突,其结果是试图混淆。

所有混淆最终都是通过模糊来保证安全,因此重要的是要重申,如果它在网络上,有人可以将其拆开,只取决于他们是否会被打扰。您的软件越有价值,这种情况就越有可能发生。

许多企业和个人似乎担心他们的软件会被盗,这通常会被误导,因为他们经常严重高估其软件的独特性,不幸的是,这些独特性在大多数情况下都不是特殊的雪花。

保护 Javascript 的唯一方法实际上是通过混淆,有很多在线工具可以实现这一点,最好的之一是 Google 的闭包编译器。混淆可以通过某种方式从代码中删除语义,例如有用的变量名称,并且某些(例如闭包编译器)实际上可以更改代码的逻辑。但是,代码仍然是代码,它仍然符合逻辑,有人可以弄清楚它的作用。

That's the result of conflict between the web being an open technology, where all client side data is open to be viewed by anyone, conflicted with the proprietary and monetary interests of businesses and profiteering individuals, and the result is, attempts at obfuscation.

All obfuscation ultimately is securty through obscurity, so it's important to reiterate if it's on the web, someone can pick it apart, just depends if they can be bothered or not. The more valuable your software is, the more likely this is to be so.

A lot of businesses and individuals seem fearful that their software will be stolen, and this is usually misguided as more than often they are grossly over estimating the uniqueness of their software which unfortunately isn't a special snowflake most of the time.

The only way you can protect your Javascript is through obfuscation really, there are lots of online tools for this, one of the best being Google's Closure Compiler. Obfuscation goes some way to remove semantics from the code, for example useful variable names, and some such as the closure compiler actually can change the logic of the code. But, the code is still code, it's still logical, and someone can figure out what it does.

花期渐远 2024-11-16 05:21:08
  1. JavaScript 中不存在“编译项目”这样的东西。
  2. 您不必“闯入未经授权的系统来获取源代码”。页面加载后,您就可以访问页面正在使用的 JavaScript 的每一部分。
  3. 版权提供少量
    的保护。如果你找到一块
    网络上的 JavaScript 是
    兴趣,你完全可以自由地
    仔细检查并在你的中重写它
    自己的风格。如果你只复制和
    粘贴受版权保护的代码,然后您可以
    有一些潜在的责任,但
    这不太可能。
  4. 唯一真实的
    保护是通过专利来实现的,但是
    没有保护就没有
    诉讼。
  1. There's no such thing as a "compiled project" in JavaScript.
  2. You do not have to "break into a system unauthorized to get the source code". As soon as your page has loaded, you have access to every bit of JavaScript the page is using.
  3. Copyrights offer a marginal amount
    of protection. If you find a piece
    of JavaScript on the net that is of
    interest, you're completely free to
    go through it and rewrite it in your
    own style. If you only copy and
    paste copyrighted code then you may
    have some potential liability but
    it's unlikely.
  4. The only true
    protection is through a patent but
    there's no protection without
    litigation.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文