使用足够的混淆器来保护我的JavaScript代码? [英] Is using an obfuscator enough to secure my JavaScript code?

查看:83
本文介绍了使用足够的混淆器来保护我的JavaScript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个用JavaScript编写的开发工具。

I'm working on building a development tool that is written in JavaScript.

这不是一个开源项目,并且会被出售(希望)作为一个商业产品。

This will not be an open source project and will be sold (hopefully) as a commercial product.

我正在寻找保护我投资的最佳方式。使用混淆器(代码管理器)足以合理地保护代码吗?

I'm looking for the best way to protect my investment. Is using an obfuscator (code mangler) enough to reasonably secure the code?

还有其他我不知道的替代方案吗?

Are there other alternatives that I am not aware of?

(我不确定混淆器是否是正确的词,它是使用你的代码并使其非常难以理解的应用程序之一。)

(I'm not sure if obfuscator is the right word, it's one of the apps that takes your code and makes it very unreadable.)

推荐答案

我要告诉你一个秘密。一旦你理解了它,你就会觉得Javascript混淆对于通过网络发送脚本时节省带宽真的很有用。

I'm going to tell you a secret. Once you understand it, you'll feel a lot better about the fact that Javascript obfuscation is only really useful for saving bandwidth when sending scripts over the wire.

你的来源 - 代码不值得偷窃。

Your source-code is not worth stealing.

我知道这对自我来说是一种震撼,但我可以自信地说出来,而没有看过你写过的一行代码因为在发生严重魔法的极少数发展领域之外,所有源代码都是如此。

I know this comes as a shock to the ego, but I can say this confidently without ever having seen a line of code you've written because outside the very few realms of development where serious magic happens, it's true of all source-code.

说明天有人在家门口甩了一堆DVD Windows Vista的源代码。你能用它做什么?当然,你可以编译并赠送副本,但这比复制零售版只要多一步。您可以费力地找到并删除许可证检查代码,但这是一些聪明的孩子已经对二进制文件做过的事情。替换徽标和图形,假装自己编写并将其作为Vicrosoft Mista推销?你会被抓住。

Say, tomorrow, someone dumped a pile of DVDs on your doorstep containing the source code for Windows Vista. What would you be able to do with it? Sure, you could compile it and give away copies, but that's just one step more effort than copying the retail version. You could painstakingly find and remove the license-checking code, but that's something some bright kid has already done to the binaries. Replace the logo and graphics, pretend you wrote it yourself and market it as "Vicrosoft Mista"? You'll get caught.

你可能花费大量时间阅读代码,试图理解它并真正窃取微软投资开发的知识产权产品。但是你会失望的。你会发现代码是一系列世俗的决定,一个接一个地做出来。有些人会比你想象的更聪明。有些人会让你摇头,想知道他们在那里招聘的猴子是什么样的。大多数人会耸耸肩说是的,你就是这样做的。

You could spend an enormous amount of time reading the code, trying to understand it and truly "stealing the intellectual property" that Microsoft invested in developing the product. But you'd be disappointed. You'd find the code was a long series of mundane decisions, made one after the other. Some would be smarter than you could think of. Some would leave you shaking your head wondering what kind of monkeys they're hiring over there. Most would just make you shrug and say "yeah, that's how you do that."

在这个过程中你会学到很多关于编写操作系统的知识,但那不是将伤害微软。

In the process you'll learn a lot about writing operating systems, but that's not going to hurt Microsoft.

将Vista替换为Leopard,上述段落不会改变一位。它不是微软,而是软件。这个网站上有一半人可能会开发一个Stack Overflow克隆,无论是否查看该网站的来源。他们只是没有。 Firefox和WebKit的源代码可供任何人阅读。现在从头开始编写自己的浏览器。几年后见。

Replace "Vista" with "Leopard" and the above paragraphs don't change one bit. It's not Microsoft, it's software. Half the people on this site could probably develop a Stack Overflow clone, with or without looking at the source of this site. They just haven't. The source-code of Firefox and WebKit are out there for anyone to read. Now go write your own browser from scratch. See you in a few years.

软件开发是时间的投入。想象你正在做的事情是如此特别以至于没有人可以在不看你的来源的情况下克隆它,甚至没有可操作(并且易于检测)的剪切和粘贴就能使他们的工作变得更容易,这是完全的傲慢。

Software development is an investment of time. It's utter hubris to imagine that what you're doing is so special that nobody could clone it without looking at your source, or even that it would make their job that much easier without an actionable (and easily detectable) amount of cut and paste.

这篇关于使用足够的混淆器来保护我的JavaScript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆