Free JavaScript obfuscators? [closed]

2019-01-17 02:04发布

I'm looking for a free JavaScript obfuscator. Would compression be enough? What tools would you recommend? Of course, I don't need military-style obfuscation, I need a simple way to prevent kiddies from stealing my javascript by looking at the source or by using something simple such as unescape().

Thanks, Tom

9条回答
再贱就再见
2楼-- · 2019-01-17 02:35

I will second the recommendation for YUI Compressor as well, works very well and can compress and obfuscate, also makes recommendations on javascript coding.

查看更多
可以哭但决不认输i
3楼-- · 2019-01-17 02:38
男人必须洒脱
4楼-- · 2019-01-17 02:43

As a rule of thumb, do not use a obfuscator that uses eval since this will slow down your page, use a compressor that doesn't. This will provide obfuscation for newbies, anyone else will not be deterred by any obfuscator anyway.

Most obfuscators will create a strings representing the code in the end and then use eval, this can be undone by a simple alert statements, whats the point?

查看更多
家丑人穷心不美
6楼-- · 2019-01-17 02:44

Your problem is that no matter how much you compress it or hide it, eventually the browser has to interpret it. The best you can do is renaming all variables to meaningless random vars, and removing all comments and whitespace.

A few good tools:

查看更多
在下西门庆
7楼-- · 2019-01-17 02:44

Check out For those looking - http://javascript-reference.info/javascript-obfuscators-review.htm - pretty good overview of JS obfuscators

查看更多
登录 后发表回答