Пример #1
0
        public void UpdateCRTag(string username, string tag)
        {
            int id = GetUserID(username);

            ClashRoyale cr = new ClashRoyale()
            {
                CRTag  = tag,
                UserID = id
            };

            if (UserExistsInCRTable(id))
            {
                connection.Update(cr, typeof(ClashRoyale));
            }
            else
            {
                connection.Insert(cr, typeof(ClashRoyale));
            }
        }
Пример #2
0
        /// <summary>
        /// Defines the entry point of the application.
        /// </summary>
        private static void Main()
        {
            DirectoryInfo Folder = Directory.CreateDirectory("Patched");

            string[] Paths = Directory.GetFiles("Files", "*", SearchOption.TopDirectoryOnly);

            foreach (string Path in Paths)
            {
                Supercell FileClass = null;
                byte[]    File      = System.IO.File.ReadAllBytes(Path);

                using (MemoryStream Stream = new MemoryStream(File))
                {
                    if (Encoding.UTF8.GetString(File, 0, File.Length).Contains("clashofclans"))
                    {
                        FileClass = new ClashOfClans();
                    }
                    else if (Encoding.UTF8.GetString(File, 0, File.Length).Contains("boombeach"))
                    {
                        FileClass = new BoomBeach();
                    }
                    else if (Encoding.UTF8.GetString(File, 0, File.Length).Contains("scroll"))
                    {
                        FileClass = new ClashRoyale();
                    }

                    if (FileClass != null)
                    {
                        FileClass.Process(File);
                    }
                    else
                    {
                        Console.WriteLine("[*] This file (" + Path + ") is not supported.");
                    }
                }
            }

            Console.ReadKey(false);
        }