将javascript一行代码破解为可读代码

我见过人们将他们所有的JS代码放在一行中. (像这样:http://www.drasticdata.nl/DrasticTreemap/Examples/js/swfobject.js)我知道他们正在努力保护他们的IP.但我想阅读代码并研究它.

有没有办法让这些单行代码可读?例如,将其分解为多行?

谢谢.

解决方法:

快速谷歌搜索“JavaScript de-obfuscator”将返回多个在线解析器,将混淆的代码格式化为格式化和可读的格式.

以下工作非常好:

http://jsbeautifier.org/

一旦语义形式,就无法将变量名重命名为它们.你需要经历的一些事情……

一些注意缩小和混淆的术语:

缩小(*)

Minification (also minimisation or minimization), in computer
programming languages and especially JavaScript, is the process of
removing all unnecessary characters from source code, without changing
its functionality.

混淆(*)

Obfuscated code is source or machine code that has been made difficult
to understand for humans. Programmers may deliberately obfuscate code
to conceal its purpose (security through obscurity) or its logic to
prevent tampering, deter reverse engineering, or as a puzzle or
recreational challenge for someone reading the source code. Programs
known as obfuscators transform readable code into obfuscated code
using various techniques.

参考

http://en.wikipedia.org/wiki/Obfuscated_code

http://en.wikipedia.org/wiki/Minification_(programming)

上一篇:c# – 突然出现了写一些评论的难以忍受的愿望,这是设计糟糕的症状吗?


下一篇:python中的注释约定