Merge pull request #354 from bighound/master

Update Putty.cs
This commit is contained in:
Carlos Polop 2023-04-25 17:04:44 +02:00 committed by GitHub
commit 7f8ea5fa44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,6 +129,24 @@ namespace winPEAS.KnownFileCreds
else
{
string[] subKeys = RegistryHelper.GetRegSubkeys("HKCU", "Software\\SimonTatham\\PuTTY\\Sessions\\");
RegistryKey selfKey = Registry.CurrentUser.OpenSubKey(@"Software\\SimonTatham\\PuTTY\\Sessions"); // extract own Sessions registry keys
if (selfKey != null)
{
string[] subKeyNames = selfKey.GetValueNames();
foreach (string name in subKeyNames)
{
Dictionary<string, string> putty_sess_key = new Dictionary<string, string>()
{
{ "RegKey Name", name },
{ "RegKey Value", (string)selfKey.GetValue(name) },
};
results.Add(putty_sess_key);
}
selfKey.Close();
}
foreach (string sessionName in subKeys)
{
Dictionary<string, string> putty_sess = new Dictionary<string, string>()