var a = "Incorrect value";
with ({ a: "Correct Value" }) {
console.log(a);
}
// "Correct Value"
Obfuscated Code:
var Tru_whk = "Incorrect value";
with ({ ["a"]: "Correct Value" }) {
console["log"](Tru_whk);
}
// "Incorrect value"
Additional context
Might be easiest to disable renaming fully in with statements or not support it entirely. Since any object can be passed in, theres no way for the obfuscator to know if the name will be shadowed or not.
Config and Small code sample
Config:
Code:
Obfuscated Code:
Additional context
Might be easiest to disable renaming fully in with statements or not support it entirely. Since any object can be passed in, theres no way for the obfuscator to know if the name will be shadowed or not.