Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot deobfuscate private fields #29

Open
Kaizer69 opened this issue Aug 1, 2022 · 2 comments
Open

Cannot deobfuscate private fields #29

Kaizer69 opened this issue Aug 1, 2022 · 2 comments

Comments

@Kaizer69
Copy link

Kaizer69 commented Aug 1, 2022

Hello! I try to deobfuscate a file that have private fields (hash char #):
here docs on mozilla

..............node_modules\shift-parser\dist\tokenizer.js:1536
        throw this.createILLEGAL();
        ^
Error: [1:6801]: Unexpected "#"
Console error:
  index: 6800,
  line: 1,
  column: 6801,
  parseErrorLine: 1,
  parseErrorColumn: 6801,
  description: 'Unexpected "#"'

I guess it's a problem related to shift-parser that not support those new spec.

@ben-sb
Copy link
Owner

ben-sb commented Aug 2, 2022

Yeah it is, only option to fix that would be rewriting the repo using another parser lib which I don't have time to do currently sadly

@0x1Avram
Copy link

0x1Avram commented Jan 3, 2023

I, too, was uninspired when choosing a parser for a more targeted deobfuscator. I went with esprima, which doesn't support a lot of newer language features as well. As a workaround I found that transpiling the code to a compatible version via babel before deobfuscation works well and removes the need of rewriting the project with another parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants