JS confuse simple Reference: several practical JS obfuscation tool.

First, the basic principle

Confusion involves two main ideas:

. A regular replacement by confusion implemented;

B. Alternatively confusion implemented by syntax tree.

Low first implementation cost, but the effect is generally suitable for less demanding scenes of confusion. The second realization of higher costs, but more flexible, and more secure, more suitable for combat scenes.

Second, the tool

2.1 jascriptobfascator
include online and desktop versions, the next trial results were OK.

desktop version:

v2-6501b0fff23a7af97dadc75885619520_hd.jpg

2.2 Uglifyjs (open source)

uglifyjs is an open source js compression tool, mainly used for compression, confusing features is not strong. This

Uglify confusion mainly used the following methods (AST refers to the abstract syntax tree):
String resolved to AST
parsing AST, calculate the scope, variable names, etc.
to provide AST traversal method to find the node you want to modify the
offer to AST printed source function codes
provide beautification code functions
to provide a positioning function word location

2.3  jshsman

jshaman is a commercial-grade tool, read a lot of comments communities, this is currently the best, free online use, you can also purchase a commercial version.

Address: jshaman.com/
The site is very clean, no annoying ads, using them quite refreshing.

v2-a3e6b00f4736f29beb5acfec30551981_hd.jpg

2.4  jsfuck

jsfuck is an open source js obfuscation tool, the principle is relatively simple, in fact, through a specific string with the subscript character position, then these characters replace source, in order to achieve confusion.
Official website: Jsfuck.com/Confusion function looks relatively strong, but essentially I think it is a kind of code, and it will make the file size increases a lot. For much of the code can not be confused, the confusion will go wrong.

Third, the summary

Recommendation: If you do code compression is recommended Uglifyjs, if it is for security, do js code obfuscation, it is recommended to use jshaman.


Guess you like

Origin blog.51cto.com/14237227/2445107