Skip to content

CLI option --options-preset <string> does nothing. #1221

@D01B0EB

Description

@D01B0EB

--options-preset [default, low-obfuscation, medium-obfuscation, high-obfuscation]

Expected Behavior

When I changes the option to different values the obfuscation result data size must grow.

Current Behavior

When I changes the option to different values the obfuscation result is remains the same.

Steps to Reproduce

#!/bin/bash

proj_home=/home/user/project

in_dir=$proj_home/obf-in
out_dir=$proj_home/obf-out

function compile {
	javascript-obfuscator \
		--options-preset high-obfuscation \
		--target browser-no-eval \
		--compact true \
		$in_dir --output $out_dir
}

rm -rf $out_dir
mkdir -p $out_dir

compile

Your Environment

Alpine Linux 3.18.5

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

Log

[javascript-obfuscator-cli] Obfuscating file: /home/user/obf-in/test.js...

Minimal working example that will help to reproduce issue

Any js file, but for test I used:

class A {
	foo;
	bar = 1;
	#p = 'Private';
	static test() {
		foo.a = 5;
	}
}

Obfuscated files attached!
obf-bug-test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions