js-confuser icon indicating copy to clipboard operation
js-confuser copied to clipboard

Make renameLabels a toggleable transform (like renameVariables)

Open fuzzbuck opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. RenameLabels is a default transform applied every time, however there are cases where this could be unwanted. Such as scripts with already minified & renamed labels, which contain a huge amount of said labels. The current implementation takes over 60 seconds to rename labels for my custom 2MB script!

Describe the solution you'd like Make renameLabels into a configurable transform.

Describe alternatives you've considered Reducing the amount of labels in the script, however this isn't convinient

fuzzbuck avatar Jul 04 '23 17:07 fuzzbuck

Hmm. What about the obfuscation time for Preparation ? Because they both do something similar:

  • Preparation assigns a placeholder label to every non-labeled control-flow structure
  • RenameLabels changes all labels to randomized names, and removes unused labels

I will try to optimize RenameLabels and if not, an option will be added to disable it. I just don't want this to end up breaking other transformations because some of them rely on labels to accurately read/change the AST.

If you could provide a sample that would help too.

MichaelXF avatar Jul 09 '23 00:07 MichaelXF

Hey, I've disabled renameLabels manually on a script with 1k+ labels, causing zero issues (with all high preset transforms enabled), so I'm led to believe it won't end up breaking other transformations.

Unfortunately my script is propiretary, therefore I'm not allowed to share it publicly, however I will try to write a similar script to showcase the large amount of time the afformentioned transform takes.

fuzzbuck avatar Jul 10 '23 19:07 fuzzbuck

Added in 2.0. (Currently 2.0.0-alpha.2)

https://new--confuser.netlify.app/docs/options/renamelabels#rename-labels

MichaelXF avatar Sep 30 '24 15:09 MichaelXF