Skip to content

v2.11.0

Compare
Choose a tag to compare
@j4k0xb j4k0xb released this 17 Dec 02:45
· 133 commits to master since this release
v2.11.0

Playground

  • Rewrite with options ui, file tree, tabs, references, go to declaration
    image

  • Quick actions:
    image

General

  • Parse bookmarklets: javascript:(function()%7Balert('hello%20world')%3B%7D)()%3B

Deobfuscate

  • Control flow proxy with spread parameter:
var _0xa7728a = {
    'UcfbR': function (_0x5a9ca0, ..._0x56527a) {
        return _0x5a9ca0(..._0x56527a);
    }
};
_0xa7728a[_0x5e8644(0x2)](a, ...b, ...c);

->

a(...b, ...c);
  • Partial control flow proxy property assignments:
const _0x4421b9 = {
  ["pOUyw"]: function (_0x48317b, _0x3eb9bf) {
    return _0x48317b < _0x3eb9bf;
  }
};
_0x4421b9.RLGat = "Hello World!";
const _0x2d22bf = _0x4421b9;
if (_0x2d22bf.pOUyw(a, b)) {
  console.log(_0x2d22bf.RLGat);
}

->

if (a < b) {
  console.log("Hello World!");
}
  • var a = function() {} -> function a() {} (#27)

Unminify

  • Extract sequence from for loop: for(; i < 10; a(), b(), i++); -> for (; i < 10; i++) { a(); b(); }
  • Extract sequence from assignment: t = (o = null, o); -> o = null; t = o;
  • 1 / 0 -> Infinity
  • Simplify divisions: 10 / 2 -> 5, but 1 / 3 stays 1 / 3 (more readable than 0.3333333333333333)
  • Convert concat to template literal: "'".concat(foo, "' \"").concat(bar, "\"") -> '${foo}' "${bar}";
  • void foo(); -> foo();, typeof foo(); -> foo();, !foo(); -> foo();, return void foo(); -> foo(); return;
  • Fix: don't transform { ["__proto__"]: 1 }

JSX

  • Self-closing tags: React.createElement("div", null) -> <div />
  • Spread props: React.createElement("div", {...props}) -> <div {...props} />
  • Detect more pragmas: jsx, jsxs, _jsx, _jsxs, jsxDEV, jsxsDEV
  • Fix string escaping, comments

Unpack Bundle

  • Detect globalThis.webpackJsonp