6

I want to know if there exists a tool to help in reversing a compressed javascript that has obscure variable names. I am not looking for a pretty-printing beautifier, but for a tool that actually knows how to change & propagate variable name choices.

Let me be more specific : - some of the functions belong to the 'public' API and i want to impose readable argument names in their prototypes - there are intermediary variables for document, window and other browser idioms

I would like to give this knowledge to the tool and then let it create another javascript where the knowledge would have been correctly propagated.

thanks Jerome Wagner

Jerome WAGNER
  • 21,986
  • 8
  • 62
  • 77
  • So what you really want is scope-accurate identifier renaming? – Ira Baxter Jul 13 '12 at 22:05
  • I guess we could say that. I am not sure it can be 100% "accurate" due to the highly dynamic status of the javascript language but the tool should help a human make renaming decisions & propagations – Jerome WAGNER Jul 15 '12 at 07:17

1 Answers1

1

Sounds like maybe you need a javascript refactoring tool. Something that could refactor javascript, i.e take a javascript file and rename variables.

Here are some plugins for IDE's:

http://www.brics.dk/jsrefactor/index.html

http://www.jetbrains.com/editors/javascript_editor.jsp?ide=idea#JavaScript%5Frefactoring

If you are trying to do this programatically, then this may not be the best solution for you.

Brad C
  • 720
  • 8
  • 14