简体   繁体   English

如何将参数传递给applet? (安全模式)

[英]How to pass a parameter to an applet? (secure mode)

I've been trying to find a proper way to pass some information, such as password, to my applet. 我一直在尝试寻找一种适当的方法来将某些信息(例如密码)传递到我的applet。 Since the code is executed on the client, I don't want to put that information in clear text in the "param". 由于代码是在客户端上执行的,因此我不想将该信息以明文形式放在“参数”中。

I'm using php as script to generate the web page. 我使用php作为脚本来生成网页。 So, I was wondering if there was already some kind of solution/mechanism? 因此,我想知道是否已经存在某种解决方案/机制? If not, I suppose the only way would be to encrypt the password in php, pass it as a param and decrypt in the applet? 如果没有,我想唯一的方法是在php中加密密码,将其作为参数传递并在applet中解密? My only problem would be that the way to decrypt it would be in the client applet as well. 我唯一的问题是,解密它的方式也将在客户端小程序中。 For that I suppose that someone could decompile the applet and look for it? 为此,我认为有人可以反编译applet并寻找它? Or is it safe enouph? 还是安全的?

Anyway, I'm looking for a good solutions, hope there is one? 无论如何,我正在寻找一个好的解决方案,希望有一个解决方案?

Thanks in advance. 提前致谢。

There is no secure way to do this. 没有安全的方法来执行此操作。 Any data the applet has access to the user has access to. 小程序有权访问的任何数据。 It is quite trivial to decompile Java applets, and even obfuscators only add a little delay. 反编译Java applet非常简单,甚至混淆器也只会增加一点延迟。

An idea: 一个主意:

The applet can contact the server for the password (let's say using https). 该小程序可以与服务器联系以获取密码(例如,使用https)。 Then connect to the (s)ftp server. 然后连接到(s)ftp服务器。

Note that if you're using ftp and not sftp, maybe the password is passed in clear on the network. 请注意,如果您使用的是ftp而不是sftp,则密码可能会在网络上以明文形式传递。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM