Content-Length: 316208 | pFad | https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1056

CE [BUG] Destroy Private Fields · Issue #1056 · javascript-obfuscator/javascript-obfuscator · GitHub
Skip to content

[BUG] Destroy Private Fields #1056

Closed
Closed
@BlackYuzia

Description

@BlackYuzia

Expected Behavior

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

  1. Use private fields
  2. 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

class Kruzya {
    #keys; // private, you can't steal my keys!
    #count;

    constructor(name, count = 0) {
        this.#keys = [];
        this.name = name;
        this.#count = count;
    }

    stealKeys() {
        for (const iterator of new Array(this.#count).fill(0)) {
            this.#keys.push(iterator);
        }
    }

    getInfo() {
        console.log("%s, steal [%s] of your keys!", this.name, this.#keys.length);
    }

}

const kruzya = new Kruzya("Kruzya", ~~(Math.random() * 500));
kruzya.stealKeys();
kruzya.getInfo()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1056

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy