You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could use private fields after obfuscation without errors
Current Behavior
You can't use private fields after obfuscation, but you could did it without (obfuscate).
Steps to Reproduce
Use private fields
Lose the keys Get error.
Your Environment
Obfuscator version used: 3.4.4
Node version used: 16.17.1
Stack trace
Minimal working example that will help to reproduce issue
classKruzya{
#keys;// private, you can't steal my keys!
#count;constructor(name,count=0){this.#keys =[];this.name=name;this.#count =count;}stealKeys(){for(constiteratorofnewArray(this.#count).fill(0)){this.#keys.push(iterator);}}getInfo(){console.log("%s, steal [%s] of your keys!",this.name,this.#keys.length);}}constkruzya=newKruzya("Kruzya",~~(Math.random()*500));kruzya.stealKeys();kruzya.getInfo()
Activity
sanex3339 commentedon Feb 9, 2022
Try to evaluate the code above directly in the browser's console.
I don't see any difference between original and obfuscated code:
BlackYuzia commentedon Feb 9, 2022
hmm, I could give you my current config. Maybe some function(s) do not enabled in your code? Idk what exactly function broke the code.
My Config
sanex3339 commentedon Feb 9, 2022
It's because
deadCodeInjectionadds some statements with private fields to other parts of the codeBlackYuzia commentedon Feb 9, 2022
meme, so that bug?
sanex3339 commentedon Feb 9, 2022
#1057
BlackYuzia commentedon Feb 9, 2022
@sanex3339 what about not ignore, just add before constructor fields?
like:
Because, If you use any private field(s), that could help you deobfuscate code?
sanex3339 commentedon Feb 9, 2022
Such statements might be added to any places outside of a class
BlackYuzia commentedon Feb 9, 2022
Should I test it with new build?
sanex3339 commentedon Feb 9, 2022
Released as 3.2.5
BlackYuzia commentedon Feb 10, 2022
Yep, fixed

#1053 trouble isn't fixed yet :c