MichaelXF / js-confuser

JS-Confuser is a JavaScript obfuscation tool to make your programs *impossible* to read.
https://js-confuser.com
MIT License
204 stars 32 forks source link

Make renameLabels a toggleable transform (like renameVariables) #101

Closed fuzzbuck closed 4 days ago

fuzzbuck commented 1 year ago

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

MichaelXF commented 1 year ago

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

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.

fuzzbuck commented 1 year ago

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.

MichaelXF commented 4 days ago

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

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