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

Template string obfuscation #117

Open Le0Developer opened 7 months ago

Le0Developer commented 7 months ago

Is your feature request related to a problem? Please describe.

Strings inside template literals are currently not obfuscated.

For example:

console.log(`Hello World`)

Will preserve the Hello world 1:1 into the generated code without obfuscation.

Describe the solution you'd like

[!NOTE] Codeblocks below are using ´ so they are displayed correctly.

Template strings should be obfuscated, there are multiple ways to achieve this:

Tagged function calls can be turned into regular function calls instead:

test´hello ${world}´ -> test(["hello "], world)

MichaelXF commented 7 months ago

This is good and needs to be fixed

j4k0xb commented 6 months ago

How about using babel or another tool directly instead of https://github.com/MichaelXF/js-confuser#es5 It already has all the plugins like https://babeljs.io/docs/babel-plugin-transform-template-literals so you wouldn't have to re-implement them