免费的 javascript 混淆器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3490593/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
free javascript obfuscator?
提问by haansi
thanks for your attention and precious time.
感谢您的关注和宝贵的时间。
Please mention some free javascrpt obfuscator software that can compress, obfuscates and encode javascript for protection. I serached but could found web based only and those which are free and desktop are not good. Please guide and help me.
请提及一些免费的 javascrpt 混淆器软件,它们可以压缩、混淆和编码 javascript 以进行保护。我搜索了但只能找到基于网络的,而那些免费的和桌面的都不好。请指导和帮助我。
thanks
谢谢
回答by balupton
Minification "compresses" code.
缩小“压缩”代码。
Packing "compresses" and "obfuscates" code.
打包“压缩”和“混淆”代码。
The most popular packer I believe to be: http://dean.edwards.name/packer/
我认为最受欢迎的打包机是:http: //dean.edwards.name/packer/
However Google Closure one of the highest rated minifiers can also do packing with additional options: http://code.google.com/closure/compiler/docs/api-tutorial3.html#enable
但是,Google Closure 是评分最高的压缩器之一,也可以使用其他选项进行打包:http: //code.google.com/closure/compiler/docs/api-tutorial3.html#enable
回答by NullUserException
Obfuscation: Don't do it.
混淆:不要这样做。
No matter how hard you try to obfuscate JS, it's easy to de-obfuscate it. There are many plugins available for this purpose. For example, there is Javascript Deobfuscatorfor Firefox.
无论你多么努力地试图混淆 JS,去混淆它都很容易。有许多插件可用于此目的。例如,有用于 Firefox 的Javascript Deobfuscator。
Do minify though.
不过要缩小。
It will save you and your users some bandwidth, improve load times and everybody's happy.
它将为您和您的用户节省一些带宽,缩短加载时间,让每个人都感到高兴。
回答by Chuck
YUI Compressoris generally considered the best option for minifying JavaScript. But don't imagine anything will protect your code if anyone wants to steal it — that's a fool's errand and no professional will waste his time that way.
YUI Compressor通常被认为是缩小 JavaScript 的最佳选择。但是,如果有人想窃取它,请不要想象任何东西会保护您的代码——这是愚蠢的差事,没有专业人士会那样浪费时间。
回答by rmribeiro
I would like to suggest another tool to minify / compress /obfuscate javascript: http://jscrambler.com
我想推荐另一个工具来缩小/压缩/混淆javascript:http: //jscrambler.com
Currently it is web only but an API is coming that will allow for remote call.
目前它仅适用于网络,但即将推出允许远程调用的 API。
I have found a list of known javascript obfucators here: http://www.malwareguru.org/mediawiki/index.php/Collection_of_tools_for_javascript_obfuscation_%28javascript_packers%29
我在这里找到了一个已知的 javascript 混淆器列表:http: //www.malwareguru.org/mediawiki/index.php/Collection_of_tools_for_javascript_obfuscation_%28javascript_packers%29
回答by Mike
Obfuscriptoris another free Javascript obfuscator.
Obfuscriptor是另一个免费的 Javascript 混淆器。
The obfuscated code really looks like garbage. Something like f/$873h3#"!=]f.
混淆的代码看起来真的很垃圾。类似于 f/$873h3#"!=]f。
And for non trivially small files it provides the best compression rates I've seen.
对于非常小的文件,它提供了我见过的最佳压缩率。
回答by Parker
Here's an easy web based one:
这是一个简单的基于网络的:
http://www.javascriptobfuscator.com/default.aspx
http://www.javascriptobfuscator.com/default.aspx
Also, remember that if an attacker is determined enough, they will be able to put together the original code, obfuscating just deters casual attackers and just makes it harder for the more experienced ones.
另外,请记住,如果攻击者足够坚定,他们将能够将原始代码放在一起,混淆只会阻止偶然的攻击者,只会让更有经验的人更难。
回答by Mark
Hey there is no such thing.
嘿,没有这样的事情。
Javascript needs to be interpreted by the browser, and hence has to be readable by the browser... and thus cannot be obfuscated. The ones you find on google are as good as it gets. They can make the javascript slightly hard to read by hand, but on the other hand it's pretty easy to de-obfuscate them.
Javascript 需要由浏览器解释,因此浏览器必须可读......因此不能被混淆。你在谷歌上找到的那些都是最好的。它们可以使 javascript 稍微难以手动阅读,但另一方面,对它们进行去混淆非常容易。
There is one option if you want to do something to protect your code. You can move your code to the serverside using a server side javascript solution, such as node.js. This will probably make your app overall more complicated but might be worth it if you are really serious about protecting your code.
如果您想采取一些措施来保护您的代码,则有一种选择。您可以使用服务器端 javascript 解决方案(例如 node.js)将代码移动到服务器端。这可能会使您的应用程序整体变得更加复杂,但如果您真的很想保护您的代码,这可能是值得的。
回答by mr.baby123
The meaning of obfuscatingis:
changing the code in a matter that the code will be less readable, but EXACT same functionality and logic!
意思obfuscating是:
改变代码,代码可读性会变差,但功能和逻辑完全一样!
A very good free obfuscatorthat I'm using usually, because it is:
1] free :)
2] one way obfuscating!some tools change your functions, by 'eval', which can easily show your ORGINAL code.
3] add random code inside for harder tracking.
4] and also, cleans line-breaks + empty spaces.
我通常使用的一个非常好的免费混淆器,因为它是:
1] 免费 :)
2]一种方式混淆!一些工具通过“eval”更改您的功能,这可以轻松显示您的原始代码。
3] 在内部添加随机代码以进行更难的跟踪。
4] 并且还清理换行符 + 空格。
Full URL: http://freejsobfuscator.com/
完整网址:http: //freejsobfuscator.com/
回答by Chris
Obfuscators can be beautified quite easily. ThisTypeScript project is not a silver bullet by any means, but does make beautifying MUCH more difficult depending on the parameters used.
混淆器可以很容易地美化。这个TypeScript 项目无论如何都不是灵丹妙药,但根据使用的参数确实使美化变得更加困难。
Strings are converted into hexadecimal and you will never be able to get your original code back so keep a safe copy.
字符串被转换为十六进制,您将永远无法取回原始代码,因此请妥善保管。
Also, you can run a minifier before using this but do not run this and then use a minifier. Things will likely break.
此外,您可以在使用之前运行一个 minifier,但不要运行它然后使用 minifier。事情可能会破裂。
Hereis an online playground to get your feet wet.
这是一个在线游乐场,可以让您的脚湿透。
If you don't want to use webpack, gulp, grunt - the online playground is also availablefor you to run locally credit to Tiago Serafim.
如果您不想使用 webpack、gulp、grunt -您也可以使用在线游乐场在本地运行 Tiago Serafim。
JavaScript Obfuscator Tool - Credit - Timofey Kachalov
JavaScript 混淆器工具 - 信用 - Timofey Kachalov
回答by Buzy Bug
I found an awesome obfuscator tool at here: http://javascript-obfuscator.org. The tool give me bunch of options which I can choose to protect my js source code. However, some of them would make a trade-off between code protection and code size / speed.
我在这里找到了一个很棒的混淆器工具:http: //javascript-obfuscator.org。该工具为我提供了许多选项,我可以选择这些选项来保护我的 js 源代码。但是,其中一些会在代码保护和代码大小/速度之间进行权衡。

