Exemplo n.º 1
0
 /// <summary>
 /// Запускает атаку
 /// </summary>
 public void Start()
 {
     if ((state != ControllerState.Error) && (state != ControllerState.Tuning))
     {
         if (!Core.State)
         {
             if (mode)
             {
                 SendStartSignal();
                 UpdateData("Start attack on " + Core.Params.Target.Address.ToString() + ":" + Core.Params.Target.Port);
                 Core.start();
                 state = ControllerState.Attacking;
             }
             else
             {
                 if (AttackIsAllowed)
                 {
                     Core.start();
                     UpdateData("Start attack on " + Core.Params.Target.Address.ToString() + ":" + Core.Params.Target.Port);
                     state = ControllerState.Attacking;
                 }
                 else
                 {
                     UpdateData("The attack is not yet started by the wizard");
                 }
             }
         }
         else
         {
             UpdateData("Attack already started");
         }
     }
     else
     {
         if (state == ControllerState.Error)
         {
             if (!mode)
             {
                 UpdateData("No connection to master");
             }
             else
             {
                 UpdateData("Selected port is busy");
             }
             //state = ControllerState.Error;
         }
     }
 }
Exemplo n.º 2
0
 public void Start()
 {
     if ((state != ControllerState.Error) && (state != ControllerState.Tuning))
     {
         if (!Core.State)
         {
             if (mode)
             {
                 SendStartSignal();
                 UpdateData("Начало атаки на " + Core.Params.Target.Address.ToString() + ":" + Core.Params.Target.Port);
                 Core.start();
                 state = ControllerState.Attacking;
             }
             else
             {
                 if (AttackIsAllowed)
                 {
                     Core.start();
                     UpdateData("Начало атаки на" + Core.Params.Target.Address.ToString() + ":" + Core.Params.Target.Port);
                     state = ControllerState.Attacking;
                 }
                 else
                 {
                     UpdateData("Атака еще не запущена мастером");
                 }
             }
         }
         else
         {
             UpdateData("Атака уже запущена");
         }
     }
     else
     {
         if (state == ControllerState.Error)
         {
             if (!mode)
             {
                 UpdateData("Отсутсвует подключение к мастеру");
             }
             else
             {
                 UpdateData("выбранный порт занят");
             }
             //state = ControllerState.Error;
         }
     }
 }