Skip to content

Releases: intezer/PyJSClear

0.1.5

14 Mar 15:16
ac4a210

Choose a tag to compare

  • Enforce coding standards (isort, type annotations, docstrings) across entire codebase
  • Optimize hot paths: ConstantProp 30x faster, ExpressionSimplifier 2.2x faster on large files
  • 9% faster end-to-end vs main across 525-file benchmark (20.3s → 18.5s)

0.1.4

13 Mar 09:58
3190899

Choose a tag to compare

Wide range of optimizations, recursion guards and style improvements

0.1.3

13 Mar 01:02
d43b95b

Choose a tag to compare

What's Changed

  • Add pure Python JSFuck, JJEncode, and AAEncode decoders by @itamarga in #8

Full Changelog: 0.1.2...0.1.3

0.1.2

12 Mar 12:01
1cdf3aa

Choose a tag to compare

What's Changed

0.1.2

Pure Python

PyJSClear no longer requires Node.js. The JSFuck and JJEncode transforms
that depended on Node.js eval have been removed, and the eval_unpack
fallback now uses only the built-in Python Dean Edwards unpacker.

New transforms (22)

Significantly improved deobfuscation for esbuild-bundled and complex
obfuscated JavaScript:

  • String decoding: XOR byte-array decoder, class-based lookup table decoder
  • Constant resolution: member chain resolver (A.B.C → literal), class
    static constant/method inlining, TypeScript enum inlining, global alias
    inlining (var X = JSON → JSON), hex numeric normalization
  • Modern JS recovery: optional chaining (?.), nullish coalescing (??),
    optional catch binding, let/var → const
  • Dead code elimination: dead branches in logical expressions, dead class
    properties, dead object properties, dead expressions, unreachable code
    after return/throw, noop method call removal, empty if removal
  • Cleanup: else-if flattening, trailing return removal, return undefined
    simplification, single-use variable inlining, require polyfill inlining,
    (0, expr)() comma-operator simplification
  • Static evaluation: Buffer.from([...]).toString(encoding), (N).toString()

Variable renaming

New post-pass replaces _0x-prefixed identifiers with readable names using
heuristic analysis: require() module names, constructor types, loop counters,
and usage-based method inference.

Bug fixes

  • MemberChainResolver: fixed stale placeholder '' inlining through 2-level
    alias chains (~75 false empty-string inlinings eliminated)
  • unused_vars: check side effects in ArrayExpression/ObjectExpression children
  • object_simplifier: only report changes when replacement succeeds
  • string_revealer: report changes after sequence expression mutations
  • Scope analysis: handle class expressions, rest params, and catch clauses
  • Guards against proxy function inliner blowup on deeply nested helpers

Infrastructure

  • Parallel CI test execution (pytest-xdist)
  • Snapshot regression testing with golden file
  • 1705 tests, 65 regression tests across 25 samples

Full Changelog: 0.1.1...0.1.2

0.1.1

10 Mar 18:09
b8aeb39

Choose a tag to compare

  • fuzz testing
  • bugfix in string decoder
  • upload to pypi on release