1

Among other approaches, there are ways to "prettify" obfuscated javascript. But most of such approaches are geared towards someone trying to understand code that's not their own (e.g. from a website, or something they took over, etc.).

But suppose I am the owner/author of a script which is obfuscated in production and I notice an error in production. It is still not straightforward (even if I wrote the code) to map a function/variable from the obfuscated js to the regular version.

Is there a clean way I can have a map of corresponding variables/functions in the regular and obfuscated versions?

1 Answer 1

0

This is highly dependant on your obfuscation technique.

If you're focused on translating obfuscated object (functions, variables) names back to the original function names, this could be achieved easily by creating the mapping while obfuscating your javascript code.

If the obfuscator's code is available to you (it should; or just get another obfuscation tool) adding that is trivial.

If you're talking about something that's more than just variable and function names you may need to be more specific.

1
  • Yes, that's a good idea, the obfuscator can be made to store the "mapping" during the obfuscation process.
    – dakini
    Jun 5, 2018 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.