I'd like to reverse engineer a JavaScript program by manually renaming minimified variable, parameter and function names. However, updating my reverse-engineered code to a newer version would be very difficult, because:

  1. The minimized variable names are randomized every time, which makes it hard to see what changed between two versions
  2. Even if the variable names were static, I'd have to keep track of which variable means what, which is very difficult because variable names are not globally unique, but rather per-scope

Is there any tool that could:

  1. Automatically rename variables to unique names keeping track of their scope
  2. Be able to find difference between two versions by looking at the code structure but ignoring changes in the variable names, and assign names to new variables without conflicting the old ones
  3. Automatically rename these variables based on an mapping file, such as var584 -> readPacket, var585 -> writePacket, ...
  4. Automatically convert minimified statements such as condition && statement; to if (!condition) { statement; }, and !0 to true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy