https://github.com/ptrcnull/deobf
ECMAScript deobfuscator... kinda
https://github.com/ptrcnull/deobf
Last synced: about 1 year ago
JSON representation
ECMAScript deobfuscator... kinda
- Host: GitHub
- URL: https://github.com/ptrcnull/deobf
- Owner: ptrcnull
- Created: 2019-04-20T19:42:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T14:10:43.000Z (over 4 years ago)
- Last Synced: 2025-03-25T13:46:00.659Z (over 1 year ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# deobf
Semi-modular ECMAScript deobfuscator
## Modules
### [Add if braces](lib/addIfBraces.js)
```js
// before
if (something) doSomething()
// after
if (something) {
doSomething()
}
```
### [Array bool](lib/arrayBool.js)
```js
// before
console.log(![])
console.log(!![])
// after
console.log(false)
console.log(true)
```
### [Array obfuscation](lib/arrayObfuscation.js)
TODO
### [Comma separated statements](lib/commaSeparatedStatements.js)
```js
// before
function test() {
return console.log('b'), 'a'
}
// after
function test() {
console.log('b')
return 'a'
}
```
### [Comparison order](lib/comparisonOrder.js)
```js
// before
if (null == a) {}
// after
if (a == null) {}
```
### [Expand if shortcut](lib/expandIfShortcut.js)
```js
// before
a && console.log('b')
// after
if (a) {
console.log('b')
}
```
### [Expand sequence expression](lib/expandSequenceExpression.js)
TODO
### [Function to class](lib/functionToClass.js)
TODO
### [Nested blocks](lib/nestedBlocks.js)
```js
// before
function test() {
{
console.log('a')
}
}
// after
function test() {
console.log('a')
}
```
### [Split var declarations](lib/splitVarDeclarations.js)
```js
// before
function test() {
var a = 1, b = 2
}
// after
function test() {
var a = 1
var b = 2
}
```
### [Square brackets](lib/squareBrackets.js)
```js
// before
console['log']('a')
// after
console.log('a')
```
### [Static function](lib/staticFunc.js)
```js
// before
function a() {
return 1
}
console.log(a())
// after
console.log(1)
```
### [Static if](lib/staticIf.js)
```js
// before
function test() {
if (1 == 1) {
console.log('a')
}
}
// after
function test() {
console.log('a')
}
```
### [String concat](lib/stringConcat.js)
```js
// before
console.log('a' + 'b')
// after
console.log('ab')
```
### [Unwrap ternary](lib/unwrapTernary.js)
TODO
### [Void](lib/void.js)
```js
// before
var a = void 0
// after
var a = undefined
```