MichaelXF / js-confuser

JS-Confuser is a JavaScript obfuscation tool to make your programs *impossible* to read.
https://js-confuser.com
MIT License
168 stars 28 forks source link

Control Flow Flattening breaks strict-mode redefined function declaration #87

Open MichaelXF opened 1 year ago

MichaelXF commented 1 year ago

Config and Small code sample

Config:

{
  target: "node",
  controlFlowFlattening: true
}

Code:

"use strict";
var myFunction = function () {
  console.log("Inner");
};

if (true) {
  function myFunction() {
    console.log("Outer");
  }
}

myFunction();

Expected behavior

The program should output "Inner"

Actual behavior

The program outputs "Outer"