With source being:
(function () {
class _0xf79654 {
constructor(_0x18ba7a) {
this.target = _0x18ba7a;
}
greet() {
console.log("Hello " + this.target);
}
setTarget(_0x121c44) {
this.target = _0x121c44;
}
}
const _0x431fd3 = new _0xf79654("world");
_0x431fd3.greet(), _0x431fd3.setTarget("reader"), _0x431fd3.greet();
}());
(From your classic javascript deobfuscation streaming series, for which a lot of thanks!!! made it all clear)
the following code will make the code incorrect:
const $script = refactor(source, commonMethods);
$script.normalizeIdentifiers();
console.log($script.print());
as it will output the following:
(function () {
class $$mellowMode {
constructor($arg0_eatableSaving) {
this.target = $arg0_eatableSaving;
}
greet() {
console.log("Hello " + this.target);
}
setTarget($arg0_abashedHunger) {
this.target = $arg0_abashedHunger;
}
}
const $$farTeapot = new $$lackingDude("world");
$$farTeapot.greet(), $$farTeapot.setTarget("reader"), $$farTeapot.greet();
}());
where as you can see the class is now $$mellowMode, but the constructor is $$lackingDude.
With
sourcebeing:(From your classic javascript deobfuscation streaming series, for which a lot of thanks!!! made it all clear)
the following code will make the code incorrect:
as it will output the following:
where as you can see the class is now
$$mellowMode, but the constructor is$$lackingDude.