JavaScript 混淆和缩小

发布于 2024-11-28 22:28:30 字数 141 浏览 1 评论 0原文

现代 JavaScript 混淆/缩小工具能在多大程度上保护我的代码免遭逆向工程?另外,哪些混淆平台最适合防止这种情况?制作一个程序来对代码进行反混淆并让这个过程变得毫无意义似乎是相当容易的。

如果这不是完美的,是否有任何依赖于远程服务代码的解决方案?

How well can modern JavaScript obfuscation/minification tools protect my code from reverse engineering? Also, what obfuscation platforms are the best for preventing this? It seems it would be rather easy to make a program to deobfuscate code and make the process rather pointless.

If this is not something that is perfect, are there any solutions that rely on code being served remotely?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

信愁 2024-12-05 22:28:30

通过混淆,您所能做的就是让坚定的黑客更加努力,以便借用您的代码或了解如何使用您的代码。如果他们下定决心,你就无法阻止。

有很多程序可以对代码进行精简,使其再次可读或可调试。删除所有有意义的变量名称和明显的代码注释确实会让人们更容易理解代码,但并不能阻止坚定的黑客这样做。

必须受到保护的算法或商业秘密不应该在客户端 JavaScript 中,而应该在服务器上执行,并将结果直接放入页面或通过 ajax 调用放入页面。

All you can do with obfuscation is make a determined hacker work more in order to borrow your code or understand how to use your code. You cannot prevent it if they are determined.

There are lots of programs out there that will de-minify code to make it readable or debuggable again. Removing all the meaningful variable names and obviously code comments does make it more work for someone to understand the code, but does not prevent a determined hacker from doing so.

Algorithms or trade secrets that must remain protected should not be in client-side javascript, but rather should be performed on a server with results put directly into the page or put into the page via ajax calls.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文