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

'high-obfuscation' preset does not do 'split-strings' by default #1236

Open
gunsh opened this issue Feb 10, 2024 · 0 comments
Open

'high-obfuscation' preset does not do 'split-strings' by default #1236

gunsh opened this issue Feb 10, 2024 · 0 comments

Comments

@gunsh
Copy link

gunsh commented Feb 10, 2024

Expected Behavior

Judging by the docs and source code --split-strings true should be the default when using --options-preset high-obfuscation but it does not seem to work.

It is expected that the high-obfuscation preset includes split-string by default. Source code seems to indicate exactly that but the tests disprove it.

Current Behavior

Running the two commands below yield significantly different file sizes (especially on a large file).

  • ./javascript-obfuscator --options-preset high-obfuscation file.js
  • ./javascript-obfuscator --options-preset high-obfuscation --split-strings true file.js

Looking at the generated code here are the related bits, respectively.

  • 'This\x20is\x20a\x20long\x20string\x20and\x20it\x20should\x20really\x20be\x20split\x20by\x20the\x20obfuscator!'
  • const _0x483d67 = a0_0x56a5, _0x3e020d = (_0x483d67(0x93) + 'long\x20strin' + 'g\x20and\x20it\x20s' + 'hould\x20real' + _0x483d67(0x8a) + _0x483d67(0x94) + 'bfuscator!')[_0x483d67(0x91)][_0x483d67(0x8b)](_0x3e020d);

Steps to Reproduce

  1. Use a file.js with a large enough string (sample file attached)
  2. Run the two commands above and note how the string gets split only in the 2nd run

Your Environment

  • Obfuscator version used: 4.1.0_2023-09-05T17:31:38.835Z
  • Node version used: v20.10.0

file.zip

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

1 participant