如何在Javascript中防止代码被盗? [英] How to Prevent a Code Theft in Javascript ?
本文介绍了如何在Javascript中防止代码被盗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
其实我正在开发 Chrome 扩展程序和 jQuery 插件上传并出售。当我 检查页面的来源时,我点击 资源标签,javascript文件看起来很空。 Codecanyon是如何做到的?我想在我自己的网站上有防盗文件,但我不知道怎么做。我知道 php 和 javascript 并且没有方法可以做到这一点,因为浏览器会下载文件执行它。
Actually I''m developing a Chrome extension and a jQuery plugin to upload it and sell it. When I "Inspect source" of the page and I click on the "Resources" tab, the javascript file looks empty. How does Codecanyon do that? I want to have file theft prevention in my own website too, but I don''t know how to do it. I know php and javascript and there''s no method to do it, because the browser downloads the file to execute it.
推荐答案
没办法。 JavaScript完全暴露给客户端。这是它的工作原理。代码可以被混淆,可能以复杂的方式使代码的使用变得更加困难,不再需要。
-SA
No way. JavaScript is fully exposed to the client. This is how it works. The code can be obfuscated, maybe in a sophisticated way making the use of the code much more difficult, no more.
—SA
使用javascript混淆工具:
http://www.javascriptobfuscator.com / [ ^ ]
http://www.daftlogic.com/projects-online-javascript-obfuscator.htm [<一个href =http://www.daftlogic.com/projects-online-javascript-obfuscator.htmtarget =_ blanktitle =New Window> ^ ]
Use the javascript obfuscator tools:
http://www.javascriptobfuscator.com/[^]
http://www.daftlogic.com/projects-online-javascript-obfuscator.htm[^]
这篇关于如何在Javascript中防止代码被盗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文