Experimental Javascript Deobfuscator based on AST transformations.
Currently, implements the following transformations:
- Simplify unary and binary expressions when operators are literals
'a' + 'b' + "c" + "\x64" --> 'abcd'
!!![] --> false
+(-(7*4+0xdf)) --> -251;
- Simplify member access when accessor is a literal value:
// Computed member expression to non-computed
"abcdef"['length'] --> "abcdef".length
// Combined with the previous transformation
"abcdef"['le'+'\x6e'+'g'+'th'] --> "abcdef".length
'whatever'[0] --> 'w'
- Analyze and replace final/effectively final variables.