最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Javascript obfuscation and extreme situation in production solving - Stack Overflow

programmeradmin1浏览0评论

I have a few questions regarding JavaScript obfuscation on client side.

First question: What is the best tool or best three tools which ones you could suggest for this operation?

Second question: How developers should debug such code (in example with firebug) when extreme situation appears in the production if the code is obfuscated?

P.S. - I know that it's bad practice to debug in production, but we had some emergencies and experienced sometimes such situations.

Thanks for any help!

I have a few questions regarding JavaScript obfuscation on client side.

First question: What is the best tool or best three tools which ones you could suggest for this operation?

Second question: How developers should debug such code (in example with firebug) when extreme situation appears in the production if the code is obfuscated?

P.S. - I know that it's bad practice to debug in production, but we had some emergencies and experienced sometimes such situations.

Thanks for any help!

Share Improve this question asked May 14, 2010 at 7:45 fayafaya 5,73511 gold badges39 silver badges49 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 5

1) closure piler with advanced optimizations

2) First double their pay, then show them jsbeautifier

  1. If you are looking for obfuscation I would say JScrambler. They also have a parison table on the site that lists other well known javascript obfuscators.

  2. For debugging you could use something like SpiderMonkey or Rhino. Firebug is very good to retrive the decoded source code when encoding is applied.

I think IE8 javascript debugger (under the developer tools) actually re-indent/re-format your code so its readable again.

Not sure if this feature has been added to Firebug, haven't used it lately, but I really wanted this feature a while ago.

Our SD ECMAScript Obfuscator retains a map of how it obfuscated your code. If you do client-side, obfuscated-code debugging, that map will tell which symbol in the original source is it actually referencing.

If you want to debug "nicely formatted" obfuscated code, you can get that from the ECMAScript Obfuscator, by first obfuscating (getting code with all layout lost), and then running back through the obfuscator to prettyprint it (it has this option).

A third option is to generate the obfuscated code in "debugging" mode. The obfsucated result is identifcal to what the production obfuscation is, except that each scrambled variable is named "XXX". This makes understanding the code being debugged just as easy as the original, while validating that the obfuscation renaming is correct. After you've done your debugging, you simply re-obfuscate in production mode.

发布评论

评论列表(0)

  1. 暂无评论