对仪表板小部件进行逆向工程?
是否可以?
我知道仪表板小部件只是很好地打包的 Javascript,但是是否可以查看该 Javascript 的源代码?
我意识到这可能是一个愚蠢的问题,但在为我的网站创建访问 API URL 的仪表板小部件之前,我还不想公开,我只想检查一下。
是的,我知道我很偏执! ;)
杰克
Is it possible?
I understand that Dashboard widgets are simply Javascript packaged up nicely, but is it possible to view the source of that Javascript?
I realise this might be a silly question, but before I create a Dashboard widget for my site accessing an API URL I don't want to be public yet, I'd just like to check.
And yes, I know I'm being paranoid! ;)
Jack
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,也不是。
是的,可以查看小部件 Javascript。用于访问站点 API 的脚本肯定是可见的(URL 必须位于某处,对吗?)。浏览器可用的任何内容都将可供用户使用。
不,也许可以阻止逆向工程。如果你最小化并混淆 Javascript,那么就很难看出它在做什么。当然,只要有足够的时间,坚定的攻击者总是能够逆转最小化和混淆,但这取决于您是否愿意冒这个风险。
Yes, and no.
Yes, it is possible to view the widget Javascript. The script used to access your site's API would most definitely be visible (the URL has to go somewhere, right?). Anything that's available to the browser will be available to the user.
No, it may be possible to prevent reverse engineering. If you minimize and obfuscate the Javascript, it will be fairly difficult to see what its doing. Of course a determined attacker would always be able to reverse the minimization and obfuscation, given enough time, but it is up to you on whether you want to take that risk.