2

I tries find way how to get a couple my passwords that I stored in Eclipse for FTP`s.

I use Eclipse 4 (juno), on Ubuntu 12.04, and all ftp`s stored using RSE plugin.

Found this tutorial Eclipse password recovery (cvs, subversion, ..) but seems it out of date. And I not Java programmer so it little bit difficult to me.

Noticed that in new Eclipse all passwords stored using Equinox so I also found this Interface ISecurePreferences doc.

As in the first link above, I tried install Eclipse-shell and execute next code there:

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");

but instead of the password I got "test"

also I tried check all keys using typeftp.keys(), but in the Eclipse console I got [Ljava.lang.String;@c5d03e6

how can find out with password recovery in Eclipse?

Fedik
  • 468
  • 7
  • 22
  • Equinox stores password in `~/.eclipse_keyring`. – Kane Oct 27 '12 at 14:05
  • yes, but all passwords encrypted – Fedik Oct 27 '12 at 14:09
  • See [equinox source](http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/tree/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java), `SecurePreferences.put()` – Kane Oct 27 '12 at 14:22
  • sorry not very understand where the trick ;) – Fedik Oct 27 '12 at 15:08

3 Answers3

1

A tutorial blog post based on the one referenced above, but with an explanation, and downloadable source files to recover SVN/FTP/SFTP remote connection passwords is here.

Leafy
  • 161
  • 1
  • 5
1

In Kepler and Luna the passwords seem to be in ~/.eclipse/org.eclipse.equinox.security/secure_storage. A simple plugin, based on the hello world plugin, to print the contents of the secure storage is for example here.

Groosa
  • 301
  • 3
  • 8
0

ok, I found .... my code has errors.

The right code for get a FTP password that stored in the Eclipse RSE will be:

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");

as result I got my decrypted password in the Eclipse console

but also will be good if someone explain me how can use something for get all passwords for more simple export, instead of just copy/paste each value manually

Fedik
  • 468
  • 7
  • 22