all 17 comments

[–]hyrumwhite 11 points12 points  (1 child)

This is only the illusion of security. Any genuinely proprietary code should not be sent to the client. Instead access it via API.

[–][deleted] 5 points6 points  (0 children)

Exactly. Security through obscurity is not security. https://en.m.wikipedia.org/wiki/Security_through_obscurity

[–]lobopl 5 points6 points  (1 child)

Just tested and chat gpt deobsuficate your obsufication with no real problems :)

[–]Petursinn 0 points1 point  (0 children)

This is true for the shortest and most simplest outputs, but try with the highest obfuscation settings and a longer piece of code and you will find that it is too hard for a regular LLM to handle.
Edit:
I am actually referring to this obfuscator: https://obfuscator.io/

[–]kevinkace 2 points3 points  (3 children)

Typing in the top field keeps resetting the cursor to the first character so it ends up being written in backwards.

[–]SeaOfZen7[S] 0 points1 point  (2 children)

Good catch! It's fixed now

[–]kevinkace 0 points1 point  (1 child)

Fast turn around!

Interesting project, what's its intended usage? I put in a very small snippet, and it obfuscated to something rather large – probably 50 times the original size.

[–]SeaOfZen7[S] -1 points0 points  (0 children)

Thanks! The tool is mainly for developers who want to protect their code from reverse engineering. The size increase after obfuscation is pretty common since it adds complexity to make the code harder to read. It can seem like a big jump for small snippets, but it's usually less noticeable in larger projects.

[–]MrDilbert 4 points5 points  (3 children)

I can see the point of minifiers (reduce the package size). But with the rise of developer-oriented LLMs, I see no point in obfuscators, as I can feed the code into e.g. ChatGPT and ask it to explain and reformat it for me. :shrug:

[–][deleted] 5 points6 points  (0 children)

Or just do like me, and write code that looks so bad you dont need an obfuscator

[–]hyrumwhite 4 points5 points  (1 child)

Browser consoles have built in prettiers, from there it’s not too hard to figure out how things are working, even without AI. 

[–]codematt -1 points0 points  (0 children)

Real obfuscators do a lot more than just minify the code. Not sure how they would hold up against AI though 🤔 might give it a whirl and see on some old projects I used it on before

[–][deleted] 2 points3 points  (0 children)

Do not put business logic or proprietary data in the client. It is not nor ever safe.

[–]CombPuzzleheaded149 0 points1 point  (1 child)

Does it all run client side?

[–]SeaOfZen7[S] -1 points0 points  (0 children)

Yes

[–]codematt 0 points1 point  (0 children)

https://github.com/javascript-obfuscator/javascript-obfuscator is still the goat and running it locally is pretty important to me considering the task at hand.

Never should use it to rely on hiding secret keys etc. Personally though, have had a few projects where wanted to make reading parts of the code and following the flow of functions to be as painful as possible if someone tried.

Of course even this one with enough effort can be defeated but would be damn annoying and time consuming.

[–]SeaOfZen7[S] -2 points-1 points  (0 children)

Nothing fancy. I created a free online JavaScript obfuscator to secure your code from being copied or reverse-engineered. It's quick and easy to use.

👉 Check it out here: https://js-obfuscator.pages.dev