javascript-deobfuscator
javascript-deobfuscator copied to clipboard
General purpose JavaScript deobfuscator
The current approach to gathering variable declarations and references is too loose and can result in incorrect deobfuscation. Since Shift doesn't provide this for us (like Babel does for example),...
`deobfuscate()` doesn't support [Public class fields](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields) and [Private elements](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_elements). ### Public class fields ```javascript class Foo { bar; }; ``` ``` /home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:275 return new JsError(this.startIndex, this.startLine + 1, this.startIndex -...
```javascript function foo(a, b) { bar("" + a, b) } function bar(c, d) { return (c = d), d } ``` Deobfuscate the [above code](https://eslint.org/play/#eyJ0ZXh0IjoiZnVuY3Rpb24gZm9vKGEsIGIpIHtcbiAgYmFyKFwiXCIgKyBhLCBiKVxufVxuXG5mdW5jdGlvbiBiYXIoYywgZCkge1xuICByZXR1cm4gKGMgPSBkKSwgZFxufSIsIm9wdGlvbnMiOnsicnVsZXMiOnt9LCJsYW5ndWFnZU9wdGlvbnMiOnsicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9fX19fQ==) (extracted from function `n3(e)` and...
I have come across a sample which obfuscates string and number literals with string functions. The functions used are standard functions which are "Pure", meaning they return the same result...
I encountered a sample that uses a trick to crash this deobfuscator online today. Another tool seems to have had better luck. Let me know if you're interested in the...