2012-10-27 163 views
2

我试图找到方法来获取一些我在Eclipse中存储的用于FTP的密码。Eclipse密码恢复

我在Ubuntu 12.04上使用Eclipse 4(juno),以及使用RSE插件存储的所有ftp。

找到本教程Eclipse password recovery (cvs, subversion, ..)但似乎过时了。我不是Java程序员,所以对我来说有点困难。

注意到在新Eclipse中使用Equinox存储的所有密码,所以我也发现这个Interface ISecurePreferences doc。

如上第一个链接,我尝试安装Eclipse的外壳和执行有下面的代码:

import org.eclipse.equinox.security.storage.SecurePreferencesFactory; 
import org.eclipse.equinox.security.storage.ISecurePreferences; 

ISecurePreferences root = SecurePreferencesFactory.getDefault(); 

root.nodeExists("org.eclipse.rse.core.security"); 
ISecurePreferences coresec = root.node("org.eclipse.rse.core.security"); 

coresec.nodeExists("org.eclipse.rse.systemtype.ftp"); 
ISecurePreferences typeftp = root.node("org.eclipse.rse.systemtype.ftp"); 

pass = typeftp.get("HERE_FTP_HOST/HERE_MY_FTP_USER_NAME", "test"); 

但不是密码我得到了“测试”

我也试过检查所有密钥使用typeftp.keys(),但在Eclipse控制台我得到[Ljava.lang.String;@c5d03e6

如何在Eclipse中找到密码恢复?

+0

Equinox在'〜/ .eclipse_keyring'存储密码。 – Kane

+0

肯定的,但所有的密码加密 – Fedik

+0

见[春分源(http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/tree/bundles/org.eclipse.equinox.security/src/组织/日蚀/春分/内部/安全/存储/ SecurePreferences.java),'SecurePreferences.put()' – Kane

回答

1

基于一个以上引用的教程博客文章,但有一个解释,以及可下载的源文件进行恢复SV N/FTP/SFTP远程连接密码is here

+0

感谢!它看起来更有用...导出/导入插件有多困难? – Fedik

0

好吧,我发现....我的代码有错误。

用于获取存储在Eclipse RSE将是一个FTP密码使用权代码:

import org.eclipse.equinox.security.storage.SecurePreferencesFactory; 
import org.eclipse.equinox.security.storage.ISecurePreferences; 

ISecurePreferences root = SecurePreferencesFactory.getDefault(); 

ISecurePreferences coresec = root.node("org.eclipse.rse.core.security"); 

ISecurePreferences typeftp = coresec.node("org.eclipse.rse.systemtype.ftp"); 

pass = typeftp.get("HERE_FTP_HOST//HERE_MY_FTP_USER_NAME", "test"); 

的结果我得到了在Eclipse控制台我解密的密码

,但也将是不错的,如果有人我解释如何使用的东西得到更简单的导出所有的密码,而不仅仅是复制/粘贴的每个值手动

1

在开普勒和露娜密码似乎是在〜/ .eclipse/org.eclipse.equinox.security/secure_storage。一个简单的插件,基于对你好世界插件,打印安全存储的内容是例如here.