How to retrieve a saved ftp password from phpStorm?

17.3k Views Asked by At

I know that technically, this question should be asked on phpStorm's forums, but being a popular IDE (I bet an eventual solution would also work for other popular IDEs from JetBrains), I'm thinking:

  • someone on SO might know and share the answer (faster than I'd get it from vendor)
  • the question answer might be useful and valuable to other coders (for that matter, even if I shall need to go on the vendor's forum I will get back with the answer here, when I find it)

If there is any need of context: I accidentally switched the connection type of a saved connection from ftp to local folder and when I switched back, the saved credentials were gone.

The question: Can I retrieve the saved password...

  • Angle 1: ...from this computer?
  • Angle 2: ...from another computer that has the same credentials saved, which I could access via TeamViewer, but has the password ●●●●●●(hidden)?
5

There are 5 best solutions below

4
Andrew Brown On BEST ANSWER

I know this is a 1 year old question, but for everyone else, you can try to copy the selected (hidden) password with CTRL+C, and paste it in a text document (tested with 2016.3 on Debian).

2
Ben Hitchcock On

One way that just worked for me was to install Wireshark.
Use a capture filter of 'ftp', and do a "Test connection" inside PHPStorm.
Now stop the capture and examine what you've sniffed. The password will be in there.

5
Louis On

Edit: This method can only be used in the version of 2016.1 or before. For newer version (probably 2016.2), they changed the encode method. There is no clue for me to decode it.

  1. Open C:\Users\.WebIde100\config\options\webServers.xml
  2. Find your FTP and get the encrypted password from the password attribute.
  3. Decrypt the password. I have written a PHP script to decrypt the string:

      $pwd = "Your encrypted password here.";
      $decrypted = '';
    
      while (strlen($pwd) > 0) {
        $decrypted .= chr(hexdec(substr($pwd, 0, 4)) ^ hexdec('dfaa'));
        $pwd = substr($pwd, 4, strlen($pwd) - 1);
      }
      echo $decrypted;
    

    If you trust my tools, you can use https://louislam.net/phpstorm-decrypt-password

0
PayteR On

If you use KeePass database file to store passwords, you can easely set password for that file, save and then open in KeePass manager, or migrate to other PHPStorm.

  1. Go to Settings/Preferences | Appearance & Behavior | System Settings | Passwords, enter new master password and save.
  2. Open /.PhpStorm2017.1/config/c.kdbx (in "Keepass 2" or "Keeweb") with saved master password.
  3. Here it is!

See answer here Retrieve saved (hidden) SSH password from PhpStorm 2017.1

0
Napinator On

For OSX users

Open keychain -> select the System Roots keychain (on the left side) -> search for IntelliJ.

If you click it you will see the ftp-username in the "Account" field. You can also use right click on the records to copy the password.