Javascript-obfuscator: Removed brackets when ** operator is used

Created on 29 Jan 2020  路  7Comments  路  Source: javascript-obfuscator/javascript-obfuscator

Expected Behavior

console.log((1-2) ** 2) should be obfuscated to console['log']((0x1 - 0x2) ** 0x2)

Current Behavior

Now it's obfuscated to console['log'](0x1 - 0x2 ** 0x2)

Your Environment

https://obfuscator.io/

3rd party library bug

All 7 comments

Hi. This is escodegen problem, this package does not support this operator properly.
The fix can take long time from them, so better to use Math.pow until fix

I'll try to make PR

Created the PR
https://github.com/estools/escodegen/pull/407

So, you can ping it.

Great! But what do you mean ping it? :)

Just write there something, that you need this fix, because this PR can take a few days or even week to merge and release version with fix. Previous time i'm waiting for the release with already merged fix about one week.

Released as 0.24.6

Great, it's working, thanks!

Was this page helpful?
0 / 5 - 0 ratings