-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Description
deobfuscate() doesn't support Public class fields and Private elements.
Public class fields
class Foo {
bar;
};/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:275
return new JsError(this.startIndex, this.startLine + 1, this.startIndex - this.startLineStart + 1, msg);
^
JsError: [2:8]: Only methods are allowed in classes
at GenericParser.createError (/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:275:12)
at GenericParser.parseClass (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:2467:20)
at GenericParser.parseStatementListItem (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:525:21)
at GenericParser.parseBody (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:270:59)
at GenericParser.parseScript (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:232:43)
at parse (/home/regseb/testcase/node_modules/shift-parser/src/index.js:115:43)
at deobfuscate (/home/regseb/testcase/node_modules/js-deobfuscator/dist/index.js:47:109)
at file:///home/regseb/testcase/index.js:3:13
at ModuleJob.run (node:internal/modules/esm/module_job:345:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:665:26) {
index: 19,
line: 2,
column: 8,
parseErrorLine: 2,
parseErrorColumn: 8,
description: 'Only methods are allowed in classes'
}
Private elements
class Foo {
#bar;
};/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:275
return new JsError(this.startIndex, this.startLine + 1, this.startIndex - this.startLineStart + 1, msg);
^
JsError: [2:5]: Unexpected "#"
at GenericParser.createError (/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:275:12)
at GenericParser.createILLEGAL (/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:239:14)
at GenericParser.advance (/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:1485:18)
at GenericParser.lex (/home/regseb/testcase/node_modules/shift-parser/src/tokenizer.js:1501:27)
at GenericParser.expect (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:172:19)
at GenericParser.parseClass (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:2451:10)
at GenericParser.parseStatementListItem (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:525:21)
at GenericParser.parseBody (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:270:59)
at GenericParser.parseScript (/home/regseb/testcase/node_modules/shift-parser/src/parser.js:232:43)
at parse (/home/regseb/testcase/node_modules/shift-parser/src/index.js:115:43) {
index: 16,
line: 2,
column: 5,
parseErrorLine: 2,
parseErrorColumn: 5,
description: 'Unexpected "#"'
}
Metadata
Metadata
Assignees
Labels
No labels