Synchrony Versions Save

javascript-obfuscator cleaner & deobfuscator

2.4.1

1 year ago
  • fix stringdecoder

Full list of commits here: https://github.com/relative/synchrony/compare/2.4.0...2.4.1

2.4.0

1 year ago

new CLI options:

synchrony deobfuscate <file>

Deobfuscate a file

Positionals:
  file  File to deobfuscate (include extension)              [string] [required]

Options:
      --help                             Show help                     [boolean]
      --version                          Show version number           [boolean]
      --rename                           Rename symbols automatically
                                                      [boolean] [default: false]
      --ecma-version, --esversion, --es  Set ECMA version for AST parser (see
                                         acorn docs)[string] [default: "latest"]
  -c, --config                           Supply a custom deobfuscation config
                                         (see docs)                     [string]
  -o, --output                           Where to output deobfuscated file
                                                                        [string]
  -l, --loose                            Enable loose parsing
                                                      [boolean] [default: false]
      --sourceType, --type               Source type for file ('script' or
                                         'module')  [string] [default: "module"]

Example CLI config (JSON, however the CLI will require it, meaning you can use js files and module.exports = {/*config*/})

{
  "rename": true,
  "ecmaVersion": 14,
  "output": "./a.js",
  "loose": true,
  "sourceType": "module",
  "customTransformers": [
    ["Simplify", {}],
    ["jsc-controlflow", {}],
    ["Simplify", {}],

    ["jsc-calculator", {}],
    ["DeadCode", {}],
    ["Simplify", {}]
  ]
}

Full list of commits here: https://github.com/relative/synchrony/compare/2.3.0...2.4.0

2.3.0

2 years ago

new CLI options:

synchrony deobfuscate 

Deobfuscate a file

Positionals:
  file  File to deobfuscate (include extension)              [string] [required]
Options:
  --help                       Show help                               [boolean]
  --version                    Show version number                     [boolean]
  --rename                     Rename symbols automatically
                                                      [boolean] [default: false]
  --ecma-version, --esversion  Set ECMA version for AST parser (see acorn docs)
                                                    [string] [default: "latest"]

rename symbols automatically if enabled specify ecma version on command line

https://github.com/relative/synchrony/compare/2.2.0...2.3.0

2.2.0

2 years ago

major change

AST nodes require range property!!!, this means if you are using the API and have it deobfuscate AST you must have your parser emit range property on each node

remove dead variables (not read/wrote anywhere) replace variables that are only read in functions (fixes terser's object unpacking to variable) unpack arrays that start with a "null" element demangle minified functions so that they match stringdecoder's required schemas

https://github.com/relative/synchrony/compare/2.1.5...2.2.0

2.1.5

2 years ago

fix control flow deflattening

Full Changelog: https://github.com/relative/synchrony/compare/2.1.4...2.1.5

2.1.4

2 years ago
  • fix variable reference finder in string decoder (will recurse references instead of looking at top level)
  • simplify conditionalexpressions
let x = true ? 'X' : 'Y'
// becomes
let x = 'X'
  • desequences in root Program node
  • Fix controlflow transformer
  • converts single statements if/while/for expressions into block statements
  • removes dead if/while statements (e.g. if(false), while(false))
  • decodes bare string arrays for kasada and old javascript-obfuscator scripts

https://github.com/relative/synchrony/compare/2.1.3...2.1.4