Пример #1
0
        private static void Execute()
        {
            Util.Util.ChangeConsoleColorToDefault();

            WriteMessageAndSkipLine("-------------------------------------------", 0);
            WriteMessageAndSkipLine("<<< PROCESSING >>> " + _urlTarget, 0);
            WriteMessageAndSkipLine("-------------------------------------------", 1);
            WriteMessageAndSkipLine("Localizing target host...", 1);

            httpManager = new HttpManager.HttpManager();

            if (CanMakeMoreRequest())
            {
                var request  = httpManager.WebRequestFactory(_urlTarget, _proxy, _userAgent, _requestTimeout);
                var response = request.GetResponse();

                controlRequestQuantity++;

                if (((HttpWebResponse)response).StatusCode == HttpStatusCode.OK)
                {
                    ProcessResponse((HttpWebResponse)response);
                }
                else
                {
                    Util.Util.ChangeConsoleColorToRed();
                    WriteMessageAndSkipLine("Sorry, I failed when I try to access the target :(", 0);
                }
            }
            else
            {
                WriteMessageAndSkipLine("Sorry, you have reached the maximum number of requests that you informed as a parameter {r=" + _requestQuantity + "}.", 0);
            }
        }
Пример #2
0
        private static void ProceedToAttack()
        {
            WriteMessageAndSkipLine("... PROCESSING DIRECTORY ATTACK ...", 1);

            httpManager = new HttpManager.HttpManager();

            foreach (var directory in robot.Disallows)
            {
                Util.Util.ChangeConsoleColorToDefault();

                WriteMessageAndSkipLine(string.Empty, 1);
                WriteMessageAndSkipLine("Localizing target for directory: " + directory + " ...", 0);

                Attack(robot.Domain, directory);
            }

            FinishExecution();

            Console.Read();
        }
        private static void Execute()
        {
            Console.WriteLine("... PROCESSING ...");
            Console.WriteLine();

            Console.WriteLine("Localizing target host...");
            Console.WriteLine();

            httpManager = new HttpManager.HttpManager();
            
            WebRequest request = httpManager.WebRequestFactory(_urlTarget, _proxy, string.Empty);
            WebResponse response = request.GetResponse();

            if (((HttpWebResponse)response).StatusCode == HttpStatusCode.OK)
                ProcessResponse((HttpWebResponse)response);
            else
            {
                Util.Util.ChangeConsoleColorToRed();
                Console.WriteLine("Sorry, I failed when I try to access the target :(");
            }
        }
        private static void ProceedToAttack()
        {
            Console.WriteLine("... PROCESSING DIRECTORY ATTACK ...");
            Console.WriteLine();

            httpManager = new HttpManager.HttpManager();

            foreach (var directory in robot.Disallows)
            {
                Util.Util.ChangeConsoleColorToDefault();
                Console.WriteLine();
                Console.WriteLine("Localizing target for directory: " + directory + " ...");
                Console.WriteLine();
                Attack(robot.Domain, directory);
            }

            FinishExecution();

            Console.Read();
        }