Ejemplo n.º 1
0
        public static void StartCommandLine(string cmd)
        {
            //Gets the command, which is "attack [time] [victim's ip]"
            #region Variables
            string command = "";
            string ip      = "";
            string time    = "";
            #endregion

            //Divide the string
            string[] parts = cmd.Split();

            #region Command
            command = parts[0];

            //Checks if the command has spaces and then remove them.
            if (command.Contains(" "))
            {
                command.Replace(" ", "");
            }

            //If the command isn't equals to "attack", the application exits.
            if (command != "attack" || command == "exit")
            {
                Application.Exit();
            }
            #endregion

            #region time
            //Time's equals to parts[1](the second word.
            time = parts[1];

            //Replaces the " " for "".
            if (time.Contains(' '))
            {
                time.Replace("", " ");
            }
            #endregion

            #region ip
            //Ip's equals to parts[2].
            ip = parts[2];

            //Removes the " " from ip.
            if (ip.Contains(' '))
            {
                ip.Replace(" ", "");
            }
            #endregion

            IFunctions.StartDOS(ip, Convert.ToInt32(time));
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //Configure the appereance of the program.
            #region InitialConfigs
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.DarkRed;
            #endregion

            //Shows the advices to start the program.
            #region Warnings
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            Console.WriteLine("*****Before start be certainly to be using a VPN and a VPS*****\n####I'M NOT RESPONSIBLE FOR YOUR ACTIONS####");
            Console.ForegroundColor = ConsoleColor.DarkRed;
            #endregion

            //Asks if the user wants the command line execution or the "normal one".

            Console.WriteLine("Command Line, Normal One or example?(cl/no/ex)");
            string answer = Console.ReadLine();

            if (answer.ToLower() == "no")
            {
                NormalWay.StartNormalWay();
            }
            else if (answer.ToLower() == "cl")
            {
                Console.WriteLine("To make a DOS attack: 'attack [time] [victim's ip]'");
                while (true)
                {
                    Console.Write("#> ");
                    string cmd = Console.ReadLine();
                    CommandLine.StartCommandLine(cmd);
                }
            }
            else if (answer.ToLower() == "ex")
            {
                IFunctions.StartDOS("127.0.0.1");
            }
            else
            {
                Application.Restart();
            }

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Start()
        {
            //Get the victim's ip and the time to execute it.
            int time;
            int packages;
            int packagesLength;

            Console.Write("Victim's IP address: ");
            string ip = Console.ReadLine();

            tryAgainTime :;
            Console.Write("Time to be executed(in seconds): ");
            try
            {
                time = Convert.ToInt32(Console.ReadLine());
                if (time == 0)
                {
                    MessageBox.Show("It cannot be zero!");
                    goto tryAgainTime;
                }
            }
            catch
            {
                goto tryAgainTime;
            }

            tryAgainPackages :;
            Console.Write("Number of packages to be sent:");
            try
            {
                packages = Convert.ToInt32(Console.ReadLine());
                if (packages == 0)
                {
                    MessageBox.Show("It cannot be zero!");
                    goto tryAgainPackages;
                }
            }
            catch
            {
                goto tryAgainPackages;
            }

            tryAgainPackagesLength :;

            Console.Write("Packages length: ");
            try
            {
                packagesLength = Convert.ToInt32(Console.ReadLine());
                if (packagesLength == 0)
                {
                    MessageBox.Show("It cannot be zero!");
                    goto tryAgainPackagesLength;
                }
            }
            catch
            {
                goto tryAgainPackagesLength;
            }

            //Clean the console, wait one second and then continue.
            Console.Clear();
            Thread.Sleep(1000);

            //Asks if the user wanna continue the program.
            Console.Write("Continue? [Y/N]: ");

            tryAgain :;

            try
            {
                char charactere = Convert.ToChar(Console.ReadLine());

                //If the answer is equals to 'y' or 'Y', it's going to Start, else it's going to quit the program.
                if (charactere == 'y' || charactere == 'Y')
                {
                    IFunctions.StartDOS(ip, time * 1000, packages * 1000, packagesLength * 1000);
                    Application.Exit();
                }
                else
                {
                    Application.Exit();
                }
            }
            catch
            {
                goto tryAgain;
            }
        }