-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
Is your feature request related to a problem? Please describe.
This is not necessary but fun to obfuscate all variable with unicode characters. Now if I use emoji as dictionary and pass it to --identifiers-dictionary
, the obfuscator will throw error:
/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts:84
throw new Error('Too many identifiers in the code, add more words to identifiers dictionary');
^
Error: Too many identifiers in the code, add more words to identifiers dictionary
at generateNewDictionaryName (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts:84:23)
at generateNewDictionaryName (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts:97:20)
at o.generateNewDictionaryName (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts:99:16)
at o.generateForLexicalScope (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts:73:37)
at g.storeLocalName (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/node-transformers/rename-identifiers-transformers/replacer/IdentifierReplacer.ts:50:65)
at N.storeIdentifierName (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionIdentifiersTransformer.ts:62:33)
at N.transformScopeThroughIdentifiers (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionIdentifiersTransformer.ts:58:14)
at callback (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionIdentifiersTransformer.ts:49:18)
at o.traverseScopeThroughIdentifiersRecursive (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/node/ScopeIdentifiersTraverser.ts:76:13)
at o.traverseScopeThroughIdentifiersRecursive (/usr/local/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/node/ScopeIdentifiersTraverser.ts:83:18)
Describe the solution you'd like
Support passing unicode characters to --identifiers-dictionary
Update: sorry I thought use emoji as variable name is supported.
kslr
Metadata
Metadata
Assignees
Labels
No labels